class AuthenticationMiddleware
cangjie
public class AuthenticationMiddleware <: IMiddleware功能:提供请求级身份验证中间件。
父类型:
成员概览
| 成员 | 功能 |
|---|---|
| init(IAuthenticationSchemeProvider) | 创建一个身份验证中间件实例。 |
| func invoke(HttpContext, RequestDelegate) | 在请求管道中执行身份验证处理。 |
init(IAuthenticationSchemeProvider)
cangjie
public init(schemes: IAuthenticationSchemeProvider)功能:创建一个身份验证中间件实例。
参数:
- schemes: IAuthenticationSchemeProvider - 身份验证方案提供器。
func invoke(HttpContext, RequestDelegate)
cangjie
public func invoke(context: HttpContext, next: RequestDelegate): Unit功能:在请求管道中执行身份验证处理。
参数:
- context: HttpContext - 当前 HTTP 上下文。
- next:
RequestDelegate- 下一个请求委托。
返回值:
Unit