Skip to main content

Questions tagged [service-provider]

The tag has no usage guidance.

service-provider
0 votes
1 answer
22 views

What is the Microsoft.Practices.Unity ResolverOverride equivalent in Microsoft.Extensions.DependencyInjection

I am trying to update my dependency injection to use Microsoft's built in dependency injection rather than using the deprecated Unity dependency injection. Unity has the following resolve: Resolve(...
ArnavPatel09's user avatar
0 votes
0 answers
24 views

.NET Aspire: How to use ServiceProviderOptions when using DistributedApplication?

I would like to enforce proper singleton and scoped usage in a .NET project using Aspire. In a previous project, I did something like: new HostBuilder() .UseServiceProviderFactory(new ...
Justin D. Harris's user avatar
1 vote
0 answers
31 views

How to get an existing scoped instance of a Blazor App with BlazorWebView?

I have a Blazor App, which creates an instance of "MyClass" through serviceCollection.AddScoped(). Within my Blazor App I can inject this instance. But now I want to access this instance ...
user25385380's user avatar
0 votes
0 answers
31 views

I'm migrating saml2 from springboot 3. An error occurs in the service provider's Saml2MetadataFilter. Has the format changed?

i am try Saml2MetadataFilter filter = new Saml2MetadataFilter( (RelyingPartyRegistrationResolver) relyingPartyRegistrationResolver, new OpenSamlMetadataResolver()); or ...
Klee's user avatar
  • 11
0 votes
0 answers
24 views

Laravel mock subscriber injection

I have a ShopSubscriber, registered in a service provider like this: /** @var array<class-string> */ protected $subscribe = [ ShopSubscriber::class, ]; This subscriber injects other ...
Bogdan  Dubyk's user avatar
  • 5,254
0 votes
1 answer
33 views

A Laravel PHPunit test that includes a mocked object is not modifying the service provider

I have a laravel site that includes a model object that called Importer that extends Illuminate\Database\Eloquent\Model It has a __construct function that accepts a $name and $type variable. It ...
Hoyt Jolly's user avatar
1 vote
0 answers
32 views

How to add ForceAuthn flag on AWS cognito

I'm using AWS cognito as SP while using SAML with other Idps. I want for specific customer to use ForceAuthn to enforce login in every authentication. How can I do that with AWS cognito? And could it ...
Yoni Kohn's user avatar
1 vote
1 answer
141 views

Laravel facade with bind only instantiates once

I'm making a Laravel package and I'm using a service provider and a facade to make my class available. I want that every time the user calls my class like ImageUpload::myfunc() a new instance of the ...
MPN7's user avatar
  • 1,224
0 votes
0 answers
71 views

Multiple IDPs in my Simplesamlphp SP Instance

i have a web-app with installed SimplesamlPhp. I have multiple different cusomters on this SP all independent of each other. Now i wan't to give every customer the opportunity to add his own IDP ...
Magned-devel's user avatar
0 votes
0 answers
120 views

Saml 2.0 SSO - Receiving HTTP ERROR 400 when directed to ACS URL

I have an app that I have developed as the SP, using Salesforce as the IdP. I am testing it out (localhost) so have used ngrok to expose the Api. I have made sure that I am referencing ngrok in the ...
herpreet.sond's user avatar
-1 votes
1 answer
49 views

Get the correct service from DI

I got a class using C# and .NET 6: public class MyClass() { private IMyInterface _myInterface; public MyClass(IMyInterface interfaceInstance) { _myInterface = interfaceInstance; } ...
CodeMonkey's user avatar
1 vote
1 answer
279 views

Usage of "slf4j.api" in an OSGi bundle requires extender "osgi.serviceloader.processor" after update to 2.x

I have created a small reproducer project on GitHub: slf4j-experiment Basically all I need is an OSGi bundle where some code is using slf4j-api. Example: import org.osgi.service.component.annotations....
Jmini's user avatar
  • 9,393
0 votes
0 answers
27 views

How to avoid "Cannot resolve scoped service from root provider" exception? [duplicate]

I'm developing a NuGet package to handle the authentication configuration for many ASP.NET Core applications in my company. For it to work, it needs some configuration that is only available in the ...
Tao Gómez Gil's user avatar
0 votes
0 answers
34 views

Is the CreateScope from IServiceProvider thread safe? [duplicate]

I've got a code snippet that looks a bit like this: // Program.cs services.AddScoped<IMyService, MyService>(); services.AddSingleton<SingletonService>(); // SingletonService.cs public ...
Luandersonn Airton's user avatar
0 votes
2 answers
167 views

Use DI to instantiate a service with a dynamic parameter?

I have a class with below constructor: public MyClass(SomeRequiredService srs, string someRandomInput) { } How can I register MyClass with DI but with an option to pass a different someRandomInput ...
Hamid Z's user avatar
  • 327

15 30 50 per page
1
2 3 4 5
27