CookieAuthenticationEvents Class

This default implementation of the ICookieAuthenticationEvents may be used if the application only needs to override a few of the interface methods. This may be used as a base class or may be instantiated directly.

Namespace
Microsoft.AspNetCore.Authentication.Cookies
Assemblies
  • Microsoft.AspNetCore.Authentication.Cookies

Syntax

public class CookieAuthenticationEvents : ICookieAuthenticationEvents
class Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents

Properties

Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToAccessDenied

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>
public Func<CookieRedirectContext, Task> OnRedirectToAccessDenied { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToLogin

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>
public Func<CookieRedirectContext, Task> OnRedirectToLogin { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToLogout

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>
public Func<CookieRedirectContext, Task> OnRedirectToLogout { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToReturnUrl

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>
public Func<CookieRedirectContext, Task> OnRedirectToReturnUrl { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSignedIn

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext>
public Func<CookieSignedInContext, Task> OnSignedIn { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSigningIn

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext>
public Func<CookieSigningInContext, Task> OnSigningIn { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSigningOut

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext>
public Func<CookieSigningOutContext, Task> OnSigningOut { get; set; }
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnValidatePrincipal

A delegate assigned to this property will be invoked when the related method is called.

Return type:System.Func<Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext>
public Func<CookieValidatePrincipalContext, Task> OnValidatePrincipal { get; set; }

Methods

RedirectToAccessDenied(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

Arguments:context (Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext) – Contains information about the event
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToAccessDenied(CookieRedirectContext context)
RedirectToLogin(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

Arguments:context (Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext) – Contains information about the event
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToLogin(CookieRedirectContext context)
RedirectToLogout(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

Arguments:context (Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext) – Contains information about the event
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToLogout(CookieRedirectContext context)
RedirectToReturnUrl(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

Arguments:context (Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext) – Contains information about the event
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToReturnUrl(CookieRedirectContext context)
SignedIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext)

Implements the interface method by invoking the related delegate method.

Return type:System.Threading.Tasks.Task
public virtual Task SignedIn(CookieSignedInContext context)
SigningIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext)

Implements the interface method by invoking the related delegate method.

Return type:System.Threading.Tasks.Task
public virtual Task SigningIn(CookieSigningInContext context)
SigningOut(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext)

Implements the interface method by invoking the related delegate method.

Return type:System.Threading.Tasks.Task
public virtual Task SigningOut(CookieSigningOutContext context)
ValidatePrincipal(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext)

Implements the interface method by invoking the related delegate method.

Return type:System.Threading.Tasks.Task
public virtual Task ValidatePrincipal(CookieValidatePrincipalContext context)