端点
以 discovery 返回为准。标准部署提供以下端点:
| 用途 | 端点 | 认证 |
|---|---|---|
| Discovery | /.well-known/openid-configuration |
无 |
| JWKS | /oauth/jwks |
无 |
| Authorization | /oauth/authorize |
用户会话 |
| Token | /oauth/token |
视客户端类型 |
| UserInfo | /oauth/userinfo |
Bearer Access Token |
| Introspection | /oauth/introspect |
Web 客户端认证 |
| Revocation | /oauth/revoke |
视客户端类型 |
| End Session | /oauth/logout |
OIDC 会话 |
UserInfo
Section titled “UserInfo”curl https://account.ylfcat.top/oauth/userinfo \ -H "Authorization: Bearer $ACCESS_TOKEN"curl -X POST https://account.ylfcat.top/oauth/revoke \ -u "$CLIENT_ID:$CLIENT_SECRET" \ -H 'content-type: application/x-www-form-urlencoded' \ --data-urlencode token="$REFRESH_TOKEN" \ --data-urlencode token_type_hint=refresh_token按照 RFC 7009,无论令牌是否存在,撤销端点通常都返回成功,以避免泄露令牌状态。
内省仅供能够安全认证的服务端 Web 客户端使用。SPA 应在资源服务器由服务端验证 Access Token,不应依赖把客户端密钥带到浏览器。