Add support for reading default scheme from config#41987
Add support for reading default scheme from config#41987captainsafia merged 5 commits intodotnet:mainfrom
Conversation
src/Security/Authentication/Core/src/AuthenticationConfigureOptions.cs
Outdated
Show resolved
Hide resolved
src/Security/Authentication/Core/src/DefaultAuthenticationConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Security/Authentication/test/OpenIdConnect/OpenIdConnectConfigurationTests.cs
Outdated
Show resolved
Hide resolved
src/Http/Authentication.Abstractions/src/IAuthenticationConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
76f82a3 to
f3d5d7c
Compare
src/Security/Authentication/Core/src/DefaultAuthenticationConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Security/Authentication/Core/src/AuthenticationConfigurationProviderExtensions.cs
Show resolved
Hide resolved
| services.AddWebEncoders(); | ||
| services.TryAddSingleton<ISystemClock, SystemClock>(); | ||
| services.TryAddSingleton<IAuthenticationConfigurationProvider, DefaultAuthenticationConfigurationProvider>(); | ||
| services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<AuthenticationOptions>, AuthenticationConfigureOptions>()); |
There was a problem hiding this comment.
We should also discuss configuration changes.
There was a problem hiding this comment.
Yeah at a minimum we'd have to move away from IOptions and use IOptionsMonitor for AuthenticationOptions to be able to do that.
src/Security/Authentication/Core/src/AuthenticationConfigurationProviderExtensions.cs
Show resolved
Hide resolved
| Assert.NotNull(openIdConnectOptions.Get("other")); | ||
| } | ||
|
|
||
| private IServiceCollection GenerateServicesForTest() |
There was a problem hiding this comment.
really nitty (don't feel obligated to do this): GenerateTestServices? But I'm not a huge fan of method names as sentences without spaces.
| return res.Body.WriteAsync(xmlBytes, 0, xmlBytes.Length); | ||
| } | ||
|
|
||
| public static IServiceCollection ConfigureAuthTestServices(this IServiceCollection services) |
There was a problem hiding this comment.
nit: could drop Auth, ConfigureTestServices(), since this doesn't actually configure any auth services anyways.
There was a problem hiding this comment.
Maybe want to go with the same name between this one and GenerateServicesForTest for consistency too
There was a problem hiding this comment.
I'll do this in another PR to avoid having to rekick the build again. 😓
|
😀 🐼 |
|
Hi @DamianEdwards. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
Part of #41956.
AuthenticationOptions.DefaultSchemefromAuthentication:DefaultSchemein configWebApplicationBuilder.AuthenticationGetAuthenticationConfigurationAPI toIAuthetnciationConfigurationProvider