doc-exports/docs/iam/api-ref/en-us_topic_0057845586.html
zhangyue 3b5a58b1fe IAM API 2.0.38
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2022-10-26 04:31:24 +00:00

6.5 KiB

Verifying a Token

Function

This API can be used by the administrator to verify the token of a user or used by a user to verify their token. The administrator can only verify the token of a user created using the account. If the verified token is valid, 200 is displayed.

URI

HEAD /v3/auth/tokens

Request Parameters

Table 1 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

  • To verify your own token, specify your token. There are no special requirements on the permissions that your token must have.
  • To verify the token of another user under the same domain, use a token that has permissions of the Security Administrator policy.

X-Subject-Token

Yes

String

Token to be verified.

Response Parameters

None

Example Request

curl -i -k -H "X-Auth-Token:$token" -H "X-Subject-Token:$token" -X HEAD https://sample.domain.com/v3/auth/tokens

Example Response

None

Status Codes

Status Code

Description

200

The request is successful.

401

Authentication failed.

404

The requested resource cannot be found.

500

The system is abnormal.