interface IAuthenticationHandler
cangjie
public interface IAuthenticationHandler功能:定义身份验证处理器的基础能力。
成员概览
| 成员 | 功能 |
|---|---|
| func initialize(AuthenticationScheme, HttpContext) | 使用当前方案和请求上下文初始化处理器。 |
| func authenticate() | 执行身份验证。 |
| func challenge(?AuthenticationProperties) | 触发质询流程。 |
| func forbid(?AuthenticationProperties) | 触发禁止访问流程。 |
func initialize(AuthenticationScheme, HttpContext)
cangjie
func initialize(scheme: AuthenticationScheme, context: HttpContext): Unit功能:使用当前方案和请求上下文初始化处理器。
参数:
- scheme: AuthenticationScheme - 当前身份验证方案。
- context: HttpContext - 当前 HTTP 上下文。
返回值:
Unit
func authenticate()
cangjie
func authenticate(): AuthenticateResult功能:执行身份验证。
返回值:
- AuthenticateResult - 身份验证结果。
func challenge(?AuthenticationProperties)
cangjie
func challenge(properties: ?AuthenticationProperties): Unit功能:触发质询流程。
参数:
- properties: ?AuthenticationProperties - 质询时附带的属性。
返回值:
Unit
func forbid(?AuthenticationProperties)
cangjie
func forbid(properties: ?AuthenticationProperties): Unit功能:触发禁止访问流程。
参数:
- properties: ?AuthenticationProperties - 禁止访问时附带的属性。
返回值:
Unit