Sprache

CookieValidatePrincipalContext Klasse

Definition

Kontextobjekt, das an die CookieAuthenticationEvents ValidatePrincipal-Methode übergeben wird.

public ref class CookieValidatePrincipalContext : Microsoft::AspNetCore::Authentication::Cookies::BaseCookieContext
public ref class CookieValidatePrincipalContext : Microsoft::AspNetCore::Authentication::PrincipalContext<Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^>
public class CookieValidatePrincipalContext : Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
public class CookieValidatePrincipalContext : Microsoft.AspNetCore.Authentication.PrincipalContext<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
type CookieValidatePrincipalContext = class
    inherit BaseCookieContext
type CookieValidatePrincipalContext = class
    inherit PrincipalContext<CookieAuthenticationOptions>
Public Class CookieValidatePrincipalContext
Inherits BaseCookieContext
Public Class CookieValidatePrincipalContext
Inherits PrincipalContext(Of CookieAuthenticationOptions)
Vererbung
CookieValidatePrincipalContext
Vererbung

Konstruktoren

Name Beschreibung
CookieValidatePrincipalContext(HttpContext, AuthenticationScheme, CookieAuthenticationOptions, AuthenticationTicket)

Erstellt eine neue Instanz des Kontextobjekts.

CookieValidatePrincipalContext(HttpContext, AuthenticationTicket, CookieAuthenticationOptions)

Erstellt eine neue Instanz des Kontextobjekts.

Eigenschaften

Name Beschreibung
HttpContext

Kontextobjekt, das an die CookieAuthenticationEvents ValidatePrincipal-Methode übergeben wird.

(Geerbt von BaseContext)
HttpContext

Der Kontext.

(Geerbt von BaseContext<TOptions>)
Options

Kontextobjekt, das an die CookieAuthenticationEvents ValidatePrincipal-Methode übergeben wird.

(Geerbt von BaseCookieContext)
Options

Ruft die Authentifizierungsoptionen ab, die dem Schema zugeordnet sind.

(Geerbt von BaseContext<TOptions>)
Principal

Enthält den Anspruchsprinzipal, der mit der Anforderung eintrifft. Kann geändert werden, um die Details des authentifizierten Benutzers zu ändern.

Principal

Ruft die ClaimsPrincipal enthaltenden Benutzeransprüche ab.

(Geerbt von PrincipalContext<TOptions>)
Properties

Enthält die zusätzlichen Metadaten, die mit dem Anforderungsticket ankommen. Kann geändert werden.

Properties

Ruft den AuthenticationProperties ab oder legt ihn fest.

(Geerbt von PropertiesContext<TOptions>)
Request

Kontextobjekt, das an die CookieAuthenticationEvents ValidatePrincipal-Methode übergeben wird.

(Geerbt von BaseContext)
Request

Die Anforderung.

(Geerbt von BaseContext<TOptions>)
Response

Kontextobjekt, das an die CookieAuthenticationEvents ValidatePrincipal-Methode übergeben wird.

(Geerbt von BaseContext)
Response

Die Antwort.

(Geerbt von BaseContext<TOptions>)
Scheme

Das Authentifizierungsschema.

(Geerbt von BaseContext<TOptions>)
ShouldRenew

Wenn true, wird das Cookie erneuert.

Methoden

Name Beschreibung
RejectPrincipal()

Wird aufgerufen, um den eingehenden Prinzipal abzulehnen. Dies kann geschehen, wenn die Anwendung festgestellt hat, dass das Konto nicht mehr aktiv ist, und die Anforderung sollte so behandelt werden, als wäre sie anonym.

ReplacePrincipal(ClaimsPrincipal)

Wird aufgerufen, um den Anspruchsprinzipal zu ersetzen. Der angegebene Prinzipal ersetzt den Wert der Principal-Eigenschaft, die die Identität der authentifizierten Anforderung bestimmt.

Gilt für: