class JwtBearerEvents
cangjie
public class JwtBearerEvents功能:提供 JWT Bearer 身份验证事件回调集合。
成员概览
| 成员 | 功能 |
|---|---|
| var onForbidden | 禁止访问事件回调。 |
| var onChallenge | 质询事件回调。 |
| var onTokenValidated | 令牌验证成功事件回调。 |
| var onMessageReceived | 消息接收事件回调。 |
| var onAuthenticationFailed | 身份验证失败事件回调。 |
| func forbidden(ForbiddenContext) | 触发禁止访问事件。 |
| func challenge(JwtBearerChallengeContext) | 触发质询事件。 |
| func tokenValidated(TokenValidatedContext) | 触发令牌验证成功事件。 |
| func messageReceived(MessageReceivedContext) | 触发消息接收事件。 |
| func authenticationFailed(AuthenticationFailedContext) | 触发身份验证失败事件。 |
var onForbidden
cangjie
public var onForbidden: (context: ForbiddenContext) -> Unit =功能:禁止访问事件回调。
类型:(context: ForbiddenContext) -> Unit
var onChallenge
cangjie
public var onChallenge: (context: JwtBearerChallengeContext) -> Unit =功能:质询事件回调。
类型:(context: JwtBearerChallengeContext) -> Unit
var onTokenValidated
cangjie
public var onTokenValidated: (context: TokenValidatedContext) -> Unit =功能:令牌验证成功事件回调。
类型:(context: TokenValidatedContext) -> Unit
var onMessageReceived
cangjie
public var onMessageReceived: (context: MessageReceivedContext) -> Unit =功能:消息接收事件回调。
类型:(context: MessageReceivedContext) -> Unit
var onAuthenticationFailed
cangjie
public var onAuthenticationFailed: (context: AuthenticationFailedContext) -> Unit =功能:身份验证失败事件回调。
类型:(context: AuthenticationFailedContext) -> Unit
func forbidden(ForbiddenContext)
cangjie
public func forbidden(context: ForbiddenContext): Unit功能:触发禁止访问事件。
参数:
- context: ForbiddenContext - 禁止访问上下文。
返回值:
Unit
func challenge(JwtBearerChallengeContext)
cangjie
public func challenge(context: JwtBearerChallengeContext): Unit功能:触发质询事件。
参数:
- context: JwtBearerChallengeContext - 质询上下文。
返回值:
Unit
func tokenValidated(TokenValidatedContext)
cangjie
public func tokenValidated(context: TokenValidatedContext): Unit功能:触发令牌验证成功事件。
参数:
- context: TokenValidatedContext - 令牌验证上下文。
返回值:
Unit
func messageReceived(MessageReceivedContext)
cangjie
public func messageReceived(context: MessageReceivedContext): Unit功能:触发消息接收事件。
参数:
- context: MessageReceivedContext - 消息接收上下文。
返回值:
Unit
func authenticationFailed(AuthenticationFailedContext)
cangjie
public func authenticationFailed(context: AuthenticationFailedContext): Unit功能:触发身份验证失败事件。
参数:
- context: AuthenticationFailedContext - 身份验证失败上下文。
返回值:
Unit