checkAuthToken
checkAuthToken
Verify and check if the user's access_token
authorization is valid.
Request:
example
{
}
Parameter | Meaning | Type | Required | Default value | Description |
---|---|---|---|---|---|
HEADERS | |||||
Content-Type | string | Y | application/json | ||
Authorization | string | Y | Bearer | ||
BODY | |||||
Response:
{
"status": 1,
"message": "",
"info": {
// decode from token
"client_id": "arctos-switch",
"user_id": 1010000006,
"role": "SWITCH"
}
}
Parameter | Meaning | Type | Existed | Default value | Description |
---|---|---|---|---|---|
BODY | |||||
status | response status | string | Y | 0: fail | |
1: success | |||||
2: warning | |||||
message | message | string | Y | “” | Error messages should be shown when there are errors. |
info | Return Information | object | |||
client_id | User’s jwt client_id | string | Y | “” | |
user_id | User’s jwt user_id | string | Y | “” | |
role | User’s jwt role | string | Y | “GUSET” | |
license_room | number | Y | |||
license_path | string | Y |
Error code:
The following is a table of error messages returned by the API.
Code | Status | Error | Message |
---|---|---|---|
200 | 1 | success | |
0 | Unauthorized Access | ||
401 | 1401 | Authorization is null | |
1402 | Authorization type is incorrect | ||
1403 | Unauthorized | ||
1404 | Token has expired | ||
1405 | Token is invalid | ||
404 | Resource Not Found | ||
403 | 3401 | License file is not found | |
3402 | License file type is incorrect | ||
3403 | Unauthorized | ||
3404 | License has expired | ||
3405 | License room out of limit | ||
3406 | License room not exist |