Refresh an existing JWT Token for already authenticated user.
put
/tokens
Returns a new JWT token for self.
Request
There are no request parameters for this operation.
Security
-
basicAuth: basic
Type:
basic
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : token-response
Type:
Show Source
object
-
accessToken:
string
JWT token string.
-
expiresIn:
string
Time after which the token gets expired.
-
tokenType:
string
Type of token. Its value is Bearer.
Examples
The following example refreshes an existing JWT token for already authenticated user.
cURL Example
curl -I -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6IkFVLVlxTGsyalVtQ1hhSkdRaUdJak9zSlJXbyIsImtpZCI6InhlbGwifQ.eyJleHAiOjE0Njc4ODk3OTksInN1YiI6InZpcGluIiwiaXNzIjoid3d3Lm9yYWNsZS5jb20iLCJwcm4iOiJ2aXBpbiIsImlhdCI6MTQ2Nzg4Nzk5OX0.weIqbo140nOZ4hOTDoXznj9gVQwzyAKmQWAUbcAPCOn39C-OOd1L3lPqfk5EIGDrgqSP0az4jqz-8C0ak__dmLIQzYWlZ_rYpsBcX2dcyIoFzEceh2j6Vrc-OLCuer6phCm8YbgdQfvN579AjrsqTg9VDDBAbOc98jgeYsclRdg" "https://pseudo.com/iam/governance/token/api/v1/tokens"
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "expiresIn": "1799", "tokenType": "Bearer", "accessToken": "eyJ4NXQiOiJvd2YzU0hsTnNob25sM2lZOXUtUnQtZjRETGciLCJraWQiOiJ4ZWxsIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJ4ZWxzeXNhZG0iLCJpc3MiOiJ3d3cub3JhY2xlLmNvbSIsImV4cCI6MTQ4MjM5NDIwNSwicHJuIjoieGVsc3lzYWRtIiwiaWF0IjoxNDgyMzkyNDA1fQ.bckyK9TSICdY4kqi2DpYy8rLzntrynPTOgj4XZRxN2CRpwdS_Vss9lS_BWk9Dz3GgZOEroAvUYTdP7Wh-ulqN23Xn0ez3ZPY3s6icCSBqK3Lw_kXoSm4NQL7UGzsF_tAsarLFQWn5xpORVmWRMxHTXycI14cVC_ZPNxubfsK6ec" }