Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In AadIssuerValidator, make the config manager an injectable singleton #402

Closed
pmaytak opened this issue Aug 5, 2020 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@pmaytak
Copy link
Contributor

pmaytak commented Aug 5, 2020

Currently in AadIssuerValidator, ConfigurationManager is a private static variable.

private static readonly ConfigurationManager<IssuerMetadata> s_configManager = new ConfigurationManager<IssuerMetadata>(Constants.AzureADIssuerMetadataUrl, new IssuerConfigurationRetriever());

Investigate to possibly make it an injectable singleton, so it's easier to fake/replace.

@Tratcher
Copy link

Compare to the options pattern AspNet uses that allows you to provide a backchannel and/or a configuration manager:
https://github.com/dotnet/aspnetcore/blob/3fdbc2e90d9762324ef3809098c9ca25b0cb3284/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectPostConfigureOptions.cs#L67-L105

@jennyf19
Copy link
Collaborator

Included in 1.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants