统一身份认证服务 IAM-创建OpenID Connect身份提供商配置:请求示例

时间:2024-08-16 08:45:06

请求示例

  • 创建支持编程访问配置的OpenID Connect身份提供商。
    POST /v3.0/OS-FEDERATION/identity-providers/{idp_id}/openid-connect-config 
      
     { 
       "openid_connect_config" : { 
         "access_mode" : "program", 
         "idp_url" : "https://accounts.example.com", 
         "client_id" : "client_id_example", 
         "signing_key" : "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"use\":\"sig\",\"n\":\"example\",\"kid\":\"kid_example\",\"alg\":\"RS256\"}]}" 
       } 
     }
  • 创建支持编程访问和管理控制台访问配置的OpenID Connect身份提供商。
    POST /v3.0/OS-FEDERATION/identity-providers/{idp_id}/openid-connect-config 
      
     { 
       "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\"}]}" 
       } 
     }
support.huaweicloud.com/api-iam/iam_13_0207.html