Table of Contents

Class ConfigureCookieWithTicketStoreAuthenticationOptions

Namespace
Arc4u.OAuth2.Options
Assembly
Arc4u.OAuth2.AspNetCore.Authentication.dll

Configures the authentication cookie so the session is kept in an ITicketStore. It is registered (with TryAddSingleton) by AddOidcAuthentication and AddHybridAuthentication when AuthenticationCacheTicketStoreOption is set; another IPostConfigureOptions<TOptions> of the cookie options registered before replaces it.

public class ConfigureCookieWithTicketStoreAuthenticationOptions : IPostConfigureOptions<CookieAuthenticationOptions>
Inheritance
ConfigureCookieWithTicketStoreAuthenticationOptions
Implements
Inherited Members

Constructors

ConfigureCookieWithTicketStoreAuthenticationOptions(ITicketStore, IOptionsMonitor<OidcAuthenticationOptions>)

Initializes a new instance of the ConfigureCookieWithTicketStoreAuthenticationOptions class.

public ConfigureCookieWithTicketStoreAuthenticationOptions(ITicketStore ticketStore, IOptionsMonitor<OidcAuthenticationOptions> optionsMonitor)

Parameters

ticketStore ITicketStore

The store in which the authentication tickets are kept.

optionsMonitor IOptionsMonitor<OidcAuthenticationOptions>

The OpenID Connect authentication options.

Methods

PostConfigure(string?, CookieAuthenticationOptions)

Configures the cookie: the ticket store keeps the session, the name comes from CookieName, the expiration is the shorter of AuthenticationTicketTtl and RefreshTokenLifetime (sliding), and the cookie is essential, SameSite=Lax and secure.

public void PostConfigure(string? name, CookieAuthenticationOptions options)

Parameters

name string

The name of the options instance.

options CookieAuthenticationOptions

The cookie options to configure.