Security
The user calls "..../admin/publicApi/token", with a user name and password, and, if authenticated, a JWT token is returned to the user in the authentication response body.
The token has a five-minute timeout and can be refreshed by requesting a new token while the current token is still valid. In addition, the "..../admin/publicApi/token" endpoint provides basic information about the token's expiration.
The following table lists the properties that can be used in the body of a token request and/or are provided in the response body.
Resource: Token
| Property Name | Type | Editable | Filter or Sort | Optional | Description |
|---|---|---|---|---|---|
| userName | String | Yes | Neither | Required only on a PUT call request, but always returned in the response to a PUT or a POST. | The username of the person trying to use the API. The user needs to have the account admin role for the account being requested. |
| password | String | Yes | Neither | Required only for a POST request. | The password for the user. Will never be returned in the response
body.
Note: Not required for obtaining a token for the tenant portal
APIs. Refer to Tenant Portal API Requirements.
added this for
5.8
|
| token | String | No | Neither | Yes (Never needed in request body) | The token returned for this user. Will be ignored on a POST and a PUT. |
| expireDateTime | String < DateTime> | No | Neither | Yes (Never needed in request body)
correct
|
Expiration time and date for the token returned to the user, given in iso80601 date/time format. |
| serverVersion | String | No | Neither | Yes | The server version. |
Security URIs and Actions
The following table indicates the URIs that you can append to the root URI, along with the actions you can take, and possible return codes you can receive.
Security URIs and Actions
Example of Generating an Authorization Token
This example uses the following URI:
https://Jeff245.cloudpath.net/admin/publicApi/token
where https://Jeff245.cloudpath.net/admin/publicApi is the root URI of the Cloudpath system being used (must include https, as shown).
The following table shows the required request header for this URI example:
An example of the request body is shown below (this provides administrative login credentials to the Cloudpath system being used):
{"userName":"jeffr@commscope.com",
"password":"test"}
Use the POST action to send the request.
Once the request is sent, you will receive the response body that provides the token and its expiration, as shown in the following example:
{
"userName": "jeffr@commscope.com",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqZWZmLnJob2RpZUBhcnJpcy5jb20iLCJyb2xlUGsiOiIyMTAwMCIsImFjY291bnRBZG1pblBrIjoiMiIsImFwaUtleSI6IkhOV2dNSG93cERCNCIsImlhdCI6MTU3NTQ4NjExMSwiZXhwIjoxNTc1NDg2NDExfQ.JwBWDgj_K7jP1kDvVU8aq_vmNulsdx2FD_MUNLAuymQ",
"expireDateTime": "2019-12-04T12:06:51-07:00[America/Denver]"
}