Freigeben über


CookieSlidingExpirationContext Klasse

Definition

Context-Objekt, das an die CookieAuthenticationEvents OnCheckSlidingExpiration-Methode übergeben wird.

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)
Vererbung

Konstruktoren

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

Erstellt eine neue Instanz des Kontextobjekts.

Eigenschaften

ElapsedTime

Die Zeitspanne, die verstrichen ist, seit das Cookie ausgestellt oder erneuert wurde.

HttpContext

Der Kontext.

(Geerbt von BaseContext<TOptions>)
Options

Ruft die dem Schema zugeordneten Authentifizierungsoptionen ab.

(Geerbt von BaseContext<TOptions>)
Principal

Ruft die ab, die ClaimsPrincipal die Benutzeransprüche enthält.

(Geerbt von PrincipalContext<TOptions>)
Properties

Ruft den AuthenticationProperties ab oder legt diesen fest.

(Geerbt von PropertiesContext<TOptions>)
RemainingTime

Die Zeitspanne, die noch verbleibt, bis das Cookie abläuft.

Request

Die Anforderung.

(Geerbt von BaseContext<TOptions>)
Response

Die Antwort.

(Geerbt von BaseContext<TOptions>)
Scheme

Das Authentifizierungsschema.

(Geerbt von BaseContext<TOptions>)
ShouldRenew

Wenn true, wird das Cookie erneuert. Der Anfangswert ist true, wenn die verstrichene Zeit größer als die verbleibende Zeit ist (z. B. mehr als 50 % abgelaufen).

Gilt für: