This API is used to check the validity of a specified token. If the token is valid, detailed information about the token will be returned.
GET /v3/auth/tokens
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
|
X-Subject-Token |
Yes |
String |
Token to be verified. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
nocatalog |
No |
String |
If this parameter is set, no catalog information will be displayed in the response. |
curl -i -k -H "X-Auth-Token:$token" -H "X-Subject-Token:$token" -X GET https://sample.domain.com/v3/auth/tokens
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Subject-Token |
Yes |
String |
Verified token. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
token |
Yes |
Object |
Token information list. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
methods |
Yes |
Array |
Method of obtaining the token, for example, password. |
expires_at |
Yes |
String |
Expiration date of the token. |
issued_at |
Yes |
String |
Time when the token was issued. |
user |
Yes |
Object |
Example: "user": {
"name": "username",
"id": "userid",
"password_expires_at":"2016-11-06T15:32:17.000000",
"domain": {
"name": "domainname",
"id": "domainid"
}
}
|
domain |
No |
Object |
The system determines whether to return this field based on the scope contained in the request for obtaining the token. Example: "domain": {
"name" : "domainame",
"id" : "domainid"
}
|
project |
No |
Object |
The system determines whether to return this field based on the scope contained in the request for obtaining the token. Example: "project": {
"name": "projectname",
"id": "projectid",
}
|
catalog |
No |
Json Array |
Endpoint information. Example: "catalog": [{
"type": "identity",
"id": "1331e5cff2a74d76b03da1225910e31d",
"name": "iam",
"endpoints": [{
"url": "https://sample.domain.com/v3",
"region": "*",
"region_id": "*",
"interface": "public",
"id": "089d4a381d574308a703122d3ae738e9"
}]
}]
|
roles |
Yes |
Array |
Permissions information of the token. Example: "roles" : [{
"name" : "role1",
"id" : "roleid1"
}, {
"name" : "role2",
"id" : "roleid2"
}
]
|
{
"token" : {
"methods" : ["password"],
"expires_at" : "2015-11-09T01:42:57.527363Z",
"issued_at" : "2015-11-09T00:42:57.527404Z",
"user" : {
"domain" : {
"id" : "default",
"name" : "Default"
},
"id" : "ee4dfb6e5540447cb3741905149XXX...",
"password_expires_at":"2016-11-06T15:32:17.000000",
"name" : "admin"
},
"domain" : {
"name" : "Default",
"id" : "default"
},
"roles" : [{
"name" : "role1",
"id" : "roleid1"
}, {
"name" : "role2",
"id" : "roleid2"
}
]
}
}
Status Code |
Description |
|---|---|
200 |
The request is successful. |
400 |
The server failed to process the request. |
401 |
Authentication failed. |
403 |
Access denied. |
404 |
The requested resource cannot be found. |
503 |
Service unavailable. |