查询OpenID Connect身份提供商配置 - ShowOpenIdConnectConfig
调试
您可以在API Explorer中调试该接口。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v3.0/OS-FEDERATION/identity-providers/{idp_id}/openid-connect-config
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
idp_id | 是 | String | 身份提供商ID。 最小长度:1。最大长度:64。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
Content-Type | 是 | String | 该字段内容填为“application/json;charset=utf8”。 |
X-Auth-Token | 是 | String | 访问令牌,承载用户的身份、权限等信息。 token所需权限请参见授权项。 |
响应参数
状态码为 200 时:
参数 | 参数类型 | 描述 |
|---|---|---|
object | OpenID Connect配置详情。 |
参数 | 参数类型 | 描述 |
|---|---|---|
access_mode | String | 访问方式。
|
idp_url | String | OpenID Connect身份提供商标识,对应ID token中iss字段。 |
client_id | String | 在OpenID Connect身份提供商注册的客户端ID。 |
authorization_endpoint | String | OpenID Connect身份提供商授权地址。 访问方式为program方式时返回null。 |
scope | String | 授权请求信息范围。 访问方式为program方式时返回null。 枚举值:
说明:
例如: "openid" 、"openid email"、 "openid profile"、 "openid email profile"。 |
response_type | String | 授权请求返回的类型。 访问方式为program方式时返回null。 枚举值:
|
response_mode | String | 授权请求返回方式。 访问方式为program方式时返回null。 枚举值:
|
signing_key | String | OpenID Connect身份提供商ID Token签名的公钥。 |
请求示例
查询OpenID Connect身份提供商配置。
GET https://{address}/v3.0/OS-FEDERATION/identity-providers/{idp_id}/openid-connect-config 响应示例
状态码为 200 时:
创建成功。
{
"openid_connect_config" : {
"access_mode" : "program_console",
"idp_url" : "https://accounts.example.com",
"client_id" : "client_id_example",
"authorization_endpoint" : "https://accounts.example.com/o/oauth2/v2/auth",
"scope" : "openid",
"response_type" : "id_token",
"response_mode" : "form_post",
"signing_key" : "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"use\":\"sig\",\"n\":\"example\",\"kid\":\"kid_example\",\"alg\":\"RS256\"}]}"
}
} 状态码为 400 时:
参数无效。
{
"error_msg" : "Request body is invalid.",
"error_code" : "IAM.0011"
} 状态码为 401 时:
认证失败。
{
"error_msg" : "Request parameter %(key)s is invalid.",
"error_code" : "IAM.0007"
} 状态码为 403 时:
没有操作权限。
{
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
"error_code" : "IAM.0003"
} 状态码为 404 时:
未找到相应的资源。
{
"error_msg" : "Could not find %(target)s: %(target_id)s.",
"error_code" : "IAM.0004"
} 状态码为 500 时:
系统内部异常。
{
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
"error_code" : "IAM.0006"
} 状态码
状态码 | 描述 |
|---|---|
200 | 请求成功。 |
400 | 参数无效。 |
401 | 认证失败。 |
403 | 没有操作权限。 |
404 | 未找到相应的资源。 |
500 | 系统内部异常。 |
错误码
请参见错误码。

