class ClientSecretParserManager
cangjie
public class ClientSecretParserManager功能:管理并协调客户端密钥解析器集合。
成员概览
| 成员 | 功能 |
|---|---|
| init(Collection<IClientSecretParser>) | 使用客户端密钥解析器集合创建管理器。 |
| func tryParse(HttpContext) | 按顺序尝试解析请求中的客户端密钥。 |
| func getauthenticationMethods() | 返回所有解析器支持的认证方法列表。 |
init(Collection<IClientSecretParser>)
cangjie
public ClientSecretParserManager(private let providers: Collection<IClientSecretParser>)功能:使用客户端密钥解析器集合创建管理器。
参数:
- providers: Collection<IClientSecretParser> - 客户端密钥解析器集合。
func tryParse(HttpContext)
cangjie
public func tryParse(context: HttpContext): ?ParsedSecret功能:按顺序尝试解析请求中的客户端密钥。
参数:
- context: HttpContext - 当前 HTTP 上下文。
返回值:
- ?ParsedSecret - 返回解析成功的客户端密钥信息;如果全部失败则返回
None。
func getauthenticationMethods()
cangjie
public func getauthenticationMethods(): Array<String>功能:返回所有解析器支持的认证方法列表。
返回值:
Array<String>- 返回认证方法名称数组。