OIDC 发现文档
OpenID Connect 支持一种发现协议,该协议包含可用于配置应用程序和认证用户的信息,如令牌和公用密钥。
调用端点
您可以通过调用 .well-known
端点来获取发现文档及其包含的信息。
在哪里可以找到该端点?
您可以在以下 URL 处找到该端点:
https://<region>.appid.cloud.ibm.com/oauth/v4/<tenantID>/.well-known/openid-configuration
了解有关 可用区域 的更多信息。
如何调用端点?
要调用端点,您必须有一个有效的租户 ID,并且必须将发现文档 URI 硬编码到应用程序代码中。
请查看以下样本 cURL 请求:
curl -X GET "https://<region>.appid.cloud.ibm.com/oauth/v4/<tenantID>/.well-known/openid-configuration" -H "accept: application/json"
调用应该会返回什么内容?
返回的响应类似于以下示例:
{
"issuer": "https://us-south.appid.cloud.ibm.com/oauth/v4/39a37f57-a227-4bfe-a044-93b6e6060b61",
"authorization_endpoint": "https://us-south.appid.cloud.ibm.com/oauth/v4/39a37f57-a227-4bfe-a044-93b6e6060b61/authorization",
"token_endpoint": "https://us-south.appid.cloud.ibm.com/oauth/v4/39a37f57-a227-4bfe-a044-93b6e6060b61/token",
"jwks_uri": "https://us-south.appid.cloud.ibm.com/oauth/v4/39a37f57-a227-4bfe-a044-93b6e6060b61/publickeys",
"subject_types_supported": [
"public"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"userinfo_endpoint": "https://us-south.appid.cloud.ibm.com/oauth/v4/39a37f57-a227-4bfe-a044-93b6e6060b61/userinfo",
"scopes_supported": [
"openid"
],
"response_types_supported": [
"code"
],
"claims_supported": [
"iss",
"aud",
"exp",
"tenant",
"iat",
"sub",
"nonce",
"amr",
"oauth_client"
],
"grant_types_supported": [
"authorization_code",
"password",
"refresh_token",
"client_credentials",
"urn:ietf:params:oauth:grant-type:jwt-bearer"
],
"profiles_endpoint": "https://us-south.appid.cloud.ibm.com",
"management_endpoint": "https://us-south.appid.cloud.ibm.com/management/v4/39a37f57-a227-4bfe-a044-93b6e6060b61",
"service_documentation": "https://cloud.ibm.com/docs/appid?topic=appid-getting-started"
}
组件 | 描述 |
---|---|
issuer |
OIDC 提供者的位置。 |
authorization_endpoint |
App ID OAuth 2.0 授权端点的 URL。 |
token_endpoint |
App ID OAuth 2.0 令牌端点的 URL。 |
jwks_uri |
App ID Web 密钥集文档的 URL。 |
subject_types_supported |
一个 JSON 数组,包含 App ID 支持的主体标识类型的列表。 |
id_token_signing_alg_values_supported |
一个 JSON 数组,包含 App ID 服务器支持的 JWS 签名算法的列表。 |
userinfo_endpoint |
App ID /userinfo 端点的 URL。 |
scopes_supported |
一个 JSON 数组,包含 App ID 支持的 OAuth 2.0 作用域值的列表。 |
response_types_supported |
一个 JSON 数组,包含 App ID 支持的 OAuth 2.0 响应类型值的列表。 |
claims_supported |
一个 JSON 数组,包含声明名称的列表。 |
grant_types_supported |
一个 JSON 数组,包含支持的 OAuth 2.0 授予类型值列表。 |
profiles_endpoint |
App ID 用户概要文件端点的 URL。 |