Questions tagged [service-provider]

380 questions
0
votes
1 answer

Auth0 as SP: React app receives a SAML response instead the redirect with code and state params

We implemented Auth0 as Service Provider, like this url In React we are using this library. After login success, in the react app we are receiving a POST with the SAML response, instead of POST redirect with code and state params, that the library…
0
votes
1 answer

SAML - Parse Service Provider Metadata and extract details such as signing certificate and assertion consumer endpoint

My application acts as an SAML IdP. For this, I am in the process of registering Service Providers with my application. For this, I connect to the SP Federation Metadata URL and download the XML. Question is- is there any readily available java…
0
votes
0 answers

Laravel - why do we need service providers when we can do it with the service container

In my Laravel project, it seems to me that what I can achieve through a service provider can also be done by the service container without using any service provider. Let me show how I can achieve the goal using either approach: Service provider…
Istiaque Ahmed
  • 6,072
  • 24
  • 75
  • 141
0
votes
2 answers

In C#, what and how to pass IServiceProvider in ErrorListProvider(IServiceProvider isp)?

I am creating a vsix project where I need to add some custom errors in Error List window. Now I am stuck in IServiceProvider. What it contains and why I need this and how I can get this? In my code, I need to initialize with a service provider. How…
Tanmay Bairagi
  • 564
  • 5
  • 25
0
votes
0 answers

Laravel binding a singleton and attempting to access it keeps making new instances

I have read and attempted to apply the answers to all similar questions. I am missing some key concept, or even attempting a solution in the completely wrong way. Here is the breakdown of what I'm essentially trying to do: Bind a singleton in…
Base Desire
  • 485
  • 1
  • 5
  • 15
0
votes
1 answer

bind abstract class service in provider laravel

Gives an error: Target [MyVendor\ProductList\ProductServiceInterface] is not instantiable. ProductServiceInterface namespace MyVendor\ProductList; interface ProductServiceInterface { public function productList(); public function…
0
votes
2 answers

Calling BuildServiceProvider inside of HostBuilder to get access to a service

I am using .Net Core v2.2. I need to pass IHttpClientFactory into my custom LoggerProvider. In order to access this service from within ConfigureLogging, I can do this: .ConfigureLogging((hostingContext, logBuilder) => { var factory =…
0
votes
2 answers

How to swap out dependency in laravel container

I have registered a Paypal service provider: App\Providers\PaypalHelperServiceProvider::class, and, when I type hint it in my controller it properly resolves: public function refund(Request $request, PaypalHelper $paypal) {... Here is my provider…
user1015214
  • 2,733
  • 10
  • 36
  • 66
0
votes
1 answer

Getting error message "Class 'Foo' not found" when implement Class from adding package(TAD-PHP), downloaded via composer

I downloaded the package named "TAD-PHP" from Packagist via composer to use in my project at Laravel, but the package has no default service provider. So, I cant to register that package and cant make the alias. In local, everything is fine. I can…
Habie Smart
  • 139
  • 1
  • 9
0
votes
0 answers

How to publish and register an extra Service Provider in Laravel Package

I would like to publish an extra service provider into App/Providers/ and then register it. The problem is I'm supposed to register it in register() function while I should publish it in boot() function. How should I accomplish that? Here is what…
Agil
  • 376
  • 5
  • 26
0
votes
1 answer

How do we set up an application (SP) to use the centralized company IdP in SAML in PHP?

We have several PHP based applications at our organization. The three in question connect to our organizations SAML IdP. These except for one were all out-of-the-box applications which had the SAML stuff built in. We have a third application which…
Barry Chapman
  • 6,690
  • 3
  • 36
  • 64
0
votes
1 answer

.Net Core 2.2, Ioc container - set property after the construction of the object

How can I set the property of a service that is registered in ServiceCollection after it is constructed. I cannot pass the value to the constructor as it would result in circular dependency. Wanted behavior: public class ServiceA : IServiceA …
0
votes
2 answers

Laravel change binding with Request params

I am using Laravel Framework 5.8.21. I am trying to bind an interface to a class based on Request params inside AppServiceProvider's register method like this. public function register() { $this->app->bind('App\Contracts\SomeInterface',…
Mubin
  • 4,325
  • 5
  • 33
  • 55
0
votes
1 answer

Service Provider / DI identifiers - how to name them in PHP?

Complex PHP apps have hundreds of services. Every service is associated with a service identifier, usually it is a string chosen by developer. For example, repository.users.sqlite is an instance of UserRepository class configured to work with users…
0
votes
1 answer

Why Auth::user() return null in routes of a custom Service Provider?

I'm making a new Service called Factures in App\Services\Factures. I created the \App\Services\Factures\FacturesServiceProvider: public function register() { $this->app->bind('factures', function ($app) { return new Facture; …
Y JRB
  • 451
  • 5
  • 14