Refresh token is a token assigned to user while registration, and is used to refresh access tokens.
All the endpoints except
jwt/refresh
requires an additional headerX-Stencil-Tenantid
to specify the tenant which is refrred
POST /jwt/refresh
string
string
string
Code | Description |
---|---|
200 | The request was successful. The response will contain a JSON body. |
400 | The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present. |
401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty |
404 | The object you are trying to update doesn’t exist. The response will be empty. |
500 | There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty. |
POST /jwt/refresh/:id
POST /jwt/refresh
string
id : string
userID : string
Code | Description |
---|---|
200 | The request was successful. The response will contain a JSON body. |
400 | The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present. |
401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty |
404 | The object you are trying to update doesn’t exist. The response will be empty. |
500 | There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty. |
Sample HTTPie:
```sh
http POST http://localhost:3000/jwt/refresh/
Sample cURL:
```sh
curl -X POST http://localhost:3000/jwt/refresh/
POST /jwt/refresh/:tokenId
POST /jwt/refresh
POST /jwt/refresh
POST /jwt/refresh
POST /jwt/refresh
string
applicationsId
: Application ID required when delete all tokens associated with an application IDuserId
: User ID required when delete all tokens associated with a user IDuserId
: User ID && - applicationsId
: Application ID required when delete a tokens associated with a user ID and a application IDtokenId
: id required to delete through a specific refresh token by its IDTokenString
: String required when to delete via specific token stringCode | Description |
---|---|
200 | The request was successful. The response will contain a JSON body. |
400 | The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid Auth Service license is required and is not present. |
401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty |
404 | The object you are trying to update doesn’t exist. The response will be empty. |
500 | There was an internal error. A stack trace is provided and logged in the Auth Service log files. The response will be empty. |
Sample HTTPie:
```sh
http POST http://localhost:3000/jwt/refresh/
Sample cURL:
```sh
curl -X POST http://localhost:3000/jwt/refresh/
All endpoints are protected by authorization headers which requires authorization and x-stencil-tenanid values to be passed in headers, which are verified using the HeaderAuthService
.
The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as:
All endpoints return a standardized response object containing:
success
: Boolean indicating operation successmessage
: Descriptive message about the operation resultdata
: The requested or manipulated data (when applicable)