JwtBearerEvents Class

Definition

Specifies events which the JwtBearerHandler invokes to enable developer control over the authentication process.

public ref class JwtBearerEvents : Microsoft::AspNetCore::Authentication::JwtBearer::IJwtBearerEvents
public ref class JwtBearerEvents
public class JwtBearerEvents : Microsoft.AspNetCore.Authentication.JwtBearer.IJwtBearerEvents
public class JwtBearerEvents
type JwtBearerEvents = class
    interface IJwtBearerEvents
type JwtBearerEvents = class
Public Class JwtBearerEvents
Implements IJwtBearerEvents
Public Class JwtBearerEvents
Inheritance
JwtBearerEvents
Implements

Constructors

JwtBearerEvents()

Properties

OnAuthenticationFailed

Invoked if authentication fails during request processing. The exceptions will be re-thrown after this event unless suppressed.

OnChallenge

Invoked before a challenge is sent back to the caller.

OnForbidden

Invoked if Authorization fails and results in a Forbidden response.

OnMessageReceived

Invoked when a protocol message is first received.

OnTokenValidated

Invoked after the security token has passed validation and a ClaimsIdentity has been generated.

Methods

AuthenticationFailed(AuthenticationFailedContext)

Invoked if exceptions are thrown during request processing. The exceptions will be re-thrown after this event unless suppressed.

Challenge(JwtBearerChallengeContext)

Invoked before a challenge is sent back to the caller.

Forbidden(ForbiddenContext)

Invoked if Authorization fails and results in a Forbidden response

MessageReceived(MessageReceivedContext)

Invoked when a protocol message is first received.

TokenValidated(TokenValidatedContext)

Invoked after the security token has passed validation and a ClaimsIdentity has been generated.

Applies to