CookieAuthenticationEvents Class

Definition

Allows subscribing to events raised during cookie authentication.

C#
public class CookieAuthenticationEvents : Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents
C#
public class CookieAuthenticationEvents
Inheritance
CookieAuthenticationEvents
Implements

Constructors

Properties

OnCheckSlidingExpiration

Invoked to check if the cookie should be renewed.

OnRedirectToAccessDenied

Invoked when the client needs to be redirected to the access denied url.

OnRedirectToLogin

Invoked when the client needs to be redirected to the sign in url.

OnRedirectToLogout

Invoked when the client is to be redirected to logout.

OnRedirectToReturnUrl

Invoked when the client is to be redirected after logout.

OnSignedIn

Invoked after sign in has completed.

OnSigningIn

Invoked on signing in.

OnSigningOut

Invoked on signing out.

OnValidatePrincipal

Invoked to validate the principal.

Methods

CheckSlidingExpiration(CookieSlidingExpirationContext)

Invoked to check if the cookie should be renewed.

RedirectToAccessDenied(CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

RedirectToAccessDenied(RedirectContext<CookieAuthenticationOptions>)

Invoked when the client is being redirected to the access denied url.

RedirectToLogin(CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

RedirectToLogin(RedirectContext<CookieAuthenticationOptions>)

Invoked when the client is being redirected to the log in url.

RedirectToLogout(CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

RedirectToLogout(RedirectContext<CookieAuthenticationOptions>)

Invoked when the client is being redirected to the log out url.

RedirectToReturnUrl(CookieRedirectContext)

Implements the interface method by invoking the related delegate method.

RedirectToReturnUrl(RedirectContext<CookieAuthenticationOptions>)

Invoked when the client is being redirected after log out.

SignedIn(CookieSignedInContext)

Invoked after sign in has completed.

SigningIn(CookieSigningInContext)

Invoked during sign in.

SigningOut(CookieSigningOutContext)

Invoked on sign out.

ValidatePrincipal(CookieValidatePrincipalContext)

Invoked to validate the principal.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0