产品概述
产品优势
应用场景
openid scope 的 Access Token。GET
/userinfo
GET /userinfo HTTP/1.1Authorization: Bearer ACCESS_TOKEN_WITH_OPENID_SCOPEHost: sample.portal.tencentciam.com
名称 | 描述 |
Authorization | OAuth 2.0 Bearer Token,格式为 Bearer <Token>,其中 Bearer 为固定字符串,<Token> 为用户登录成功时得到的具备 openid scope 的 Access Token,Bearer 和 <Token> 之间用一个空格隔开。 |
HTTP/1.1 200 OKContent-Type: application/json{"sub" : "MOCK_USER_ID","email" : "MOCK_USERNAME@example.com","name" : "MOCK_NAME","nickname" : "MOCK_NICKNAME","zoneinfo" : "Asia/Shanghai","locale" : "zh-CN"}
参数 | 数据类型 | 描述 |
sub | String | 用户标识,在用户池内唯一。 |
sub 字段一定返回外,其余返回哪些字段由应用参数配置中的 Claims 决定。HTTP/1.1 400 Bad RequestWWW-Authenticate: Bearer error="invalid_request", error_description="Bearer token not found in the request", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
HTTP/1.1 401 UnauthorizedWWW-Authenticate: Bearer error="invalid_token", error_description="Error decoding JWT", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
openid scope。HTTP/1.1 403 ForbiddenWWW-Authenticate: Bearer error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token.", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
HTTP/1.1 404 Not FoundContent-Type: application/json;charset=UTF-8{"error" : "user_not_found"}
文档反馈