CookieValidatePrincipalContext Class

Definition

Context object passed to the CookieAuthenticationEvents ValidatePrincipal method.

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)
Inheritance
CookieValidatePrincipalContext
Inheritance

Constructors

CookieValidatePrincipalContext(HttpContext, AuthenticationScheme, CookieAuthenticationOptions, AuthenticationTicket)

Creates a new instance of the context object.

CookieValidatePrincipalContext(HttpContext, AuthenticationTicket, CookieAuthenticationOptions)

Creates a new instance of the context object.

Properties

HttpContext (Inherited from BaseContext)
HttpContext

The context.

(Inherited from BaseContext<TOptions>)
Options (Inherited from BaseCookieContext)
Options

Gets the authentication options associated with the scheme.

(Inherited from BaseContext<TOptions>)
Principal

Contains the claims principal arriving with the request. May be altered to change the details of the authenticated user.

Principal

Gets the ClaimsPrincipal containing the user claims.

(Inherited from PrincipalContext<TOptions>)
Properties

Contains the extra meta-data arriving with the request ticket. May be altered.

Properties

Gets or sets the AuthenticationProperties.

(Inherited from PropertiesContext<TOptions>)
Request (Inherited from BaseContext)
Request

The request.

(Inherited from BaseContext<TOptions>)
Response (Inherited from BaseContext)
Response

The response.

(Inherited from BaseContext<TOptions>)
Scheme

The authentication scheme.

(Inherited from BaseContext<TOptions>)
ShouldRenew

If true, the cookie will be renewed

Methods

RejectPrincipal()

Called to reject the incoming principal. This may be done if the application has determined the account is no longer active, and the request should be treated as if it was anonymous.

ReplacePrincipal(ClaimsPrincipal)

Called to replace the claims principal. The supplied principal will replace the value of the Principal property, which determines the identity of the authenticated request.

Applies to