CookieValidatePrincipalContext CookieValidatePrincipalContext CookieValidatePrincipalContext Class

Definition

Context object passed to the CookieAuthenticationEvents ValidatePrincipal method.

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

Constructors

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

Creates a new instance of the context object.

CookieValidatePrincipalContext(HttpContext, AuthenticationTicket, CookieAuthenticationOptions) CookieValidatePrincipalContext(HttpContext, AuthenticationTicket, CookieAuthenticationOptions) CookieValidatePrincipalContext(HttpContext, AuthenticationTicket, CookieAuthenticationOptions)

Creates a new instance of the context object.

Properties

HttpContext HttpContext HttpContext

The context.

(Inherited from BaseContext<TOptions>)
Options Options Options

Gets the authentication options associated with the scheme.

(Inherited from BaseContext<TOptions>)
Principal Principal Principal

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

Properties Properties Properties

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

Request Request Request

The request.

(Inherited from BaseContext<TOptions>)
Response Response Response

The response.

(Inherited from BaseContext<TOptions>)
Scheme Scheme Scheme

The authentication scheme.

(Inherited from BaseContext<TOptions>)
ShouldRenew ShouldRenew ShouldRenew

If true, the cookie will be renewed

Methods

RejectPrincipal() RejectPrincipal() 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) ReplacePrincipal(ClaimsPrincipal) 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