类型别名:AuthorizationServerMetadata
type AuthorizationServerMetadata = {
authorization_endpoint: string;
code_challenge_methods_supported?: string[];
grant_types_supported?: string[];
introspection_endpoint?: string;
introspection_endpoint_auth_methods_supported?: string[];
introspection_endpoint_auth_signing_alg_values_supported?: string[];
issuer: string;
jwks_uri?: string;
op_policy_uri?: string;
op_tos_uri?: string;
registration_endpoint?: string;
response_modes_supported?: string[];
response_types_supported: string[];
revocation_endpoint?: string;
revocation_endpoint_auth_methods_supported?: string[];
revocation_endpoint_auth_signing_alg_values_supported?: string[];
scope_supported?: string[];
service_documentation?: string;
token_endpoint: string;
token_endpoint_auth_methods_supported?: string[];
token_endpoint_auth_signing_alg_values_supported?: string[];
ui_locales_supported?: string[];
userinfo_endpoint?: string;
};
OAuth 2.0 授权服务器元数据(Authorization Server Metadata)的模式,定义见 RFC 8414。
类型声明
authorization_endpoint
authorization_endpoint: string;
授权服务器的授权端点(authorization endpoint)的 URL [RFC6749]。 除非不支持任何使用授权端点的授权类型,否则这是必需的。
参见
https://rfc-editor.org/rfc/rfc6749#section-3.1
code_challenge_methods_supported?
optional code_challenge_methods_supported: string[];
包含此授权服务器支持的 Proof Key for Code Exchange (PKCE) [RFC7636] code challenge 方法列表的 JSON 数组。
grant_types_supported?
optional grant_types_supported: string[];
包含此授权服务器支持的 OAuth 2.0 授权类型(grant type)值列表的 JSON 数组。数组中的值与 “OAuth 2.0 动态客户端注册协议” [RFC7591] 中 grant_types
参数所用的值相同。
如果省略,默认值为 ["authorization_code", "implicit"]
。
introspection_endpoint?
optional introspection_endpoint: string;
授权服务器的 OAuth 2.0 introspection 端点的 URL [RFC7662]。
introspection_endpoint_auth_methods_supported?
optional introspection_endpoint_auth_methods_supported: string[];
introspection_endpoint_auth_signing_alg_values_supported?
optional introspection_endpoint_auth_signing_alg_values_supported: string[];
issuer
issuer: string;
授权服务器的发行者(Issuer)标识符,是一个使用 https
协议且没有查询或片段部分的 URL。
jwks_uri?
optional jwks_uri: string;
授权服务器的 JWK Set [JWK] 文档的 URL。被引用的文档包含客户端用于验证授权服务器签名的密钥。此 URL 必须使用 https
协议。
op_policy_uri?
optional op_policy_uri: string;
op_tos_uri?
optional op_tos_uri: string;
registration_endpoint?
optional registration_endpoint: string;
授权服务器的 OAuth 2.0 动态客户端注册端点的 URL [RFC7591]。
response_modes_supported?
optional response_modes_supported: string[];
包含此授权服务器支持的 OAuth 2.0 response_mode
值列表的 JSON 数组,详见 “OAuth 2.0 多响应类型编码实践”
[OAuth.Responses]。
如果省略,默认值为 ["query", "fragment"]
。响应模式值 "form_post"
也在 “OAuth 2.0 表单提交响应模式”
[OAuth.FormPost] 中定义。
response_types_supported
response_types_supported: string[];
包含此授权服务器支持的 OAuth 2.0 response_type
值列表的 JSON 数组。数组中的值与 “OAuth 2.0 动态客户端注册协议”
[RFC7591] 中 response_types
参数所用的值相同。
revocation_endpoint?
optional revocation_endpoint: string;
授权服务器的 OAuth 2.0 撤销端点(revocation endpoint)的 URL [RFC7009]。
revocation_endpoint_auth_methods_supported?
optional revocation_endpoint_auth_methods_supported: string[];
revocation_endpoint_auth_signing_alg_values_supported?
optional revocation_endpoint_auth_signing_alg_values_supported: string[];
scope_supported?
optional scope_supported: string[];
service_documentation?
optional service_documentation: string;
token_endpoint
token_endpoint: string;
授权服务器的令牌端点(token endpoint)的 URL [RFC6749]。 除非只支持 implicit 授权类型,否则这是必需的。
参见
https://rfc-editor.org/rfc/rfc6749#section-3.2
token_endpoint_auth_methods_supported?
optional token_endpoint_auth_methods_supported: string[];
token_endpoint_auth_signing_alg_values_supported?
optional token_endpoint_auth_signing_alg_values_supported: string[];
ui_locales_supported?
optional ui_locales_supported: string[];
userinfo_endpoint?
optional userinfo_endpoint: string;
OpenID Connect userinfo endpoint 的 URL。 此端点用于获取已认证用户的信息。