อ่านในภาษาอังกฤษ

แชร์ผ่าน


JwtBearerEvents Class

Definition

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

C#
public class JwtBearerEvents : Microsoft.AspNetCore.Authentication.JwtBearer.IJwtBearerEvents
C#
public class JwtBearerEvents
Inheritance
JwtBearerEvents
Implements

Constructors

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

ผลิตภัณฑ์ เวอร์ชัน
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