Class OpenIdSettingsExtension
- Namespace
- Arc4u.OAuth2.Extensions
- Assembly
- Arc4u.OAuth2.AspNetCore.Authentication.dll
Registers the OpenIdSettingsOption as the key/value settings read by the token providers.
public static class OpenIdSettingsExtension
- Inheritance
-
OpenIdSettingsExtension
- Inherited Members
Methods
ConfigureOpenIdSettings(IServiceCollection, IConfiguration, string)
Reads the OpenID settings from a configuration section and registers them as the named SimpleKeyValueSettings Cookies.
public static SimpleKeyValueSettings ConfigureOpenIdSettings(this IServiceCollection services, IConfiguration configuration, string sectionName)
Parameters
servicesIServiceCollectionThe service collection.
configurationIConfigurationThe configuration.
sectionNamestringThe section holding the OpenIdSettingsOption, for example
Authentication:OpenId.Settings.
Returns
- SimpleKeyValueSettings
The settings registered.
Exceptions
- MissingFieldException
The provider id, the client id or the scopes are empty, or no audience is given while ValidateAudience is true.
ConfigureOpenIdSettings(IServiceCollection, Action<OpenIdSettingsOption>)
Validates the OpenID settings and registers them as the named SimpleKeyValueSettings Cookies (CookiesAuthenticationType). When an authority is set, it is registered as the named authority Cookies.
public static SimpleKeyValueSettings ConfigureOpenIdSettings(this IServiceCollection services, Action<OpenIdSettingsOption> option)
Parameters
servicesIServiceCollectionThe service collection.
optionAction<OpenIdSettingsOption>The action that configures the settings.
Returns
- SimpleKeyValueSettings
The settings registered.
Exceptions
- MissingFieldException
The provider id, the client id or the scopes are empty, or no audience is given while ValidateAudience is true.