Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Authentication

Updated on 2022-08-31 GMT+08:00

CSS supports token authentication.

Authentication Using Tokens

NOTE:

The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API.

A token specifies certain permissions in a computer system. Authentication using a token adds the token to a request as its header during API calling to obtain permissions to operate APIs through IAM.

The API for obtaining a token is POST https://{IAM endpoint}/v3/auth/tokens. For details about how to obtain IAM endpoints, see Endpoints.

{
	"auth": {
		"identity": {
			"methods": [
				"password"
			],
			"password": {
				"user": {
					"name": "username",    //Username
					"password": "********",    //Login password
					"domain": {
						"name": "domainname"    //Name of the account that the user belongs to
					}
				}
			}
		},
		"scope": {
			"project": {
				"name": "xxxxxxxx"    //Project name
			}
		}
	}
}

After a token is obtained, the X-Auth-Token header field must be added to requests to specify the token when calling other APIs. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:

POST https://{endpoint}/v3/auth/projects
Content-Type: application/json
X-Auth-Token: ABCDEFJ....
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback