Class ConfigureStandardCookieAuthenticationOptions
Configures the authentication cookie when no ticket store is used (the session is kept in the cookie). It is registered (with TryAddSingleton) by
AddOidcAuthentication and AddHybridAuthentication when AuthenticationCacheTicketStoreOption is not set.
public class ConfigureStandardCookieAuthenticationOptions : IPostConfigureOptions<CookieAuthenticationOptions>
- Inheritance
-
ConfigureStandardCookieAuthenticationOptions
- Implements
- Inherited Members
Constructors
ConfigureStandardCookieAuthenticationOptions(IOptionsMonitor<OidcAuthenticationOptions>)
Initializes a new instance of the ConfigureStandardCookieAuthenticationOptions class.
public ConfigureStandardCookieAuthenticationOptions(IOptionsMonitor<OidcAuthenticationOptions> optionsMonitor)
Parameters
optionsMonitorIOptionsMonitor<OidcAuthenticationOptions>The OpenID Connect authentication options.
ConfigureStandardCookieAuthenticationOptions(IOptionsMonitor<OidcAuthenticationOptions>, ILogger<ConfigureStandardCookieAuthenticationOptions>)
Initializes a new instance of the ConfigureStandardCookieAuthenticationOptions class.
public ConfigureStandardCookieAuthenticationOptions(IOptionsMonitor<OidcAuthenticationOptions> optionsMonitor, ILogger<ConfigureStandardCookieAuthenticationOptions> logger)
Parameters
optionsMonitorIOptionsMonitor<OidcAuthenticationOptions>The OpenID Connect authentication options.
loggerILogger<ConfigureStandardCookieAuthenticationOptions>The logger warning about a cookie name without the
__Host-prefix.
Methods
PostConfigure(string?, CookieAuthenticationOptions)
Configures the cookie: the name comes from CookieName, the expiration is the shorter of
AuthenticationTicketTtl and RefreshTokenLifetime (sliding), and the cookie is essential, SameSite=Lax,
secure, host-only and valid for the whole site (Path=/).
public void PostConfigure(string? name, CookieAuthenticationOptions options)
Parameters
namestringThe name of the options instance.
optionsCookieAuthenticationOptionsThe cookie options to configure.