OAuthAuthorizationService.GetJWKS
获取 JWKS 公钥
返回当前活跃的 ID Token 签名公钥列表(JWKS 格式,RFC 7517 §5)。用于 OIDC 双 token 模型中 id_token (JWT, RS256) 的本地验签。
Authentication
无需鉴权
该接口为公共接口,可直接调用;如携带 OAuth 2.0 access_token 或 API Key 也不会被拒绝。
Response
200 OK · GetJWKSResponse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
keys | array<JWK> | — | 当前所有未退役的 ID Token 签名公钥。 顺序约定:keys[0] 是当前活跃签发 key(最新生效),后续元素是上一代 / 上上一代 key——它们仍保留在 JWKS 里,是为了让 rotation 期间还在外面活着的旧 id_token 仍可被验证(典型 TTL 1h,rotation 时窗通常 24h)。客户端验签时按 JWT header 里的 kid 字段在本列表里查找匹配项,不要假定 keys[0] 就是要用的 key。 该响应可被 /.well-… |
错误响应 · google.rpc.Status
非 2xx 响应均按 AIP-193 规范包装为google.rpc.Status,含 code /message /details 三段。details[].reason 是机器可读的具体错误原因码,可用于客户端分支处理。
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
code | integer (int32) | — | The status code, which should be an enum value of google.rpc.Code. |
message | string | — | A developer-facing error message. |
details | array<Any> | — | A list of messages that carry the error details. |
Examples
curl -X GET \
'https://api.appforges.com/v1/oauth/jwks' \
-H 'Authorization: Bearer $ACCESS_TOKEN'OpenAPI spec v0.59.4 · synced 10/11/2026, 11:27:14 PM