class JsonWebKeySet
cangjie
public class JsonWebKeySet功能:表示 JSON Web Key 集合。
成员概览
| 成员 | 功能 |
|---|---|
| init() | 创建空的 JWK 集合。 |
| init(Collection<JsonWebKey>) | 使用给定密钥集合创建 JWK 集合。 |
| prop keys | 获取集合中的所有 JWK。 |
| func create(String) | 从 JSON 字符串创建 JWK 集合。 |
| func getSigningKeys() | 获取集合中可用于签名验证的安全密钥列表。 |
init()
cangjie
public init()功能:创建空的 JWK 集合。
init(Collection<JsonWebKey>)
cangjie
public init(keys: Collection<JsonWebKey>)功能:使用给定密钥集合创建 JWK 集合。
参数:
- keys: Collection<JsonWebKey> - 初始 JWK 集合。
prop keys
cangjie
public prop keys: List<JsonWebKey>功能:获取集合中的所有 JWK。
类型:List<JsonWebKey>
func create(String)
cangjie
public static func create(json: String): JsonWebKeySet功能:从 JSON 字符串创建 JWK 集合。
参数:
- json:
String- JWKS 的 JSON 表示。
返回值:
- JsonWebKeySet - 解析后的
JsonWebKeySet实例。
func getSigningKeys()
cangjie
public func getSigningKeys(): ReadOnlyList<SecurityKey>功能:获取集合中可用于签名验证的安全密钥列表。
返回值:
- ReadOnlyList<SecurityKey> - 可转换并支持签名用途的安全密钥列表。
异常:
UnsupportedException- 当集合中存在不受支持的密钥类型时抛出。