示例
POST /connect/introspect HTTP/1.1
Authorization: Basic <base64(ApiResourceName:ApiResourceSecret)>
Content-Type: application/x-www-form-urlencoded
Accept: application/json
token=<access_token>
* 此處使用的是HTTP基本認證(Basic access authentication),且符合基本認證規範。
成功的響應將返回狀態代碼200以及活動或非活動令牌:
{
"nbf": <生成時間截>,
"exp": <失效時間截>,
"iss": "https://sso.foxconn.com",
"aud": "<APIResourceName>",
"client_id": "<使用的client_id>",
"sub": "<用户名(client credentials模式无此值)>",
"active": true,
"scope": "<API Scope>"
}
未知或過期的令牌將被標記為無效:
{
"active": false
}
無效請求將返回400,未授權請求401。