Dela via


CookieSlidingExpirationContext Class

Definition

Context object passed to the CookieAuthenticationEvents OnCheckSlidingExpiration method.

public class CookieSlidingExpirationContext : Microsoft.AspNetCore.Authentication.PrincipalContext<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
type CookieSlidingExpirationContext = class
    inherit PrincipalContext<CookieAuthenticationOptions>
Public Class CookieSlidingExpirationContext
Inherits PrincipalContext(Of CookieAuthenticationOptions)
Inheritance

Constructors

CookieSlidingExpirationContext(HttpContext, AuthenticationScheme, CookieAuthenticationOptions, AuthenticationTicket, TimeSpan, TimeSpan)

Creates a new instance of the context object.

Properties

ElapsedTime

The amount of time that has elapsed since the cookie was issued or renewed.

HttpContext

The context.

(Inherited from BaseContext<TOptions>)
Options

Gets the authentication options associated with the scheme.

(Inherited from BaseContext<TOptions>)
Principal

Gets the ClaimsPrincipal containing the user claims.

(Inherited from PrincipalContext<TOptions>)
Properties

Gets or sets the AuthenticationProperties.

(Inherited from PropertiesContext<TOptions>)
RemainingTime

The amount of time left until the cookie expires.

Request

The request.

(Inherited from BaseContext<TOptions>)
Response

The response.

(Inherited from BaseContext<TOptions>)
Scheme

The authentication scheme.

(Inherited from BaseContext<TOptions>)
ShouldRenew

If true, the cookie will be renewed. The initial value will be true if the elapsed time is greater than the remaining time (e.g. more than 50% expired).

Applies to