oidc-lite

Refresh Token API

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 header X-Stencil-Tenantid to specify the tenant which is refrred

Key Features

Sequence Diagram

Groups Sequence Diagram

Refresh Token

Request

Refreshes an access token using a refresh token.

POST /jwt/refresh

Request Headers

Request Parameters

Response

Response Codes

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.

Retrieve Refresh Token

Request

Retrieve Refresh Token by ID

POST /jwt/refresh/:id

Retrieve Refresh Tokens by User ID

POST /jwt/refresh

Request Headers

Request Parameters

Response

Response Codes

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.

Delelte Refresh Tokens

Request

Delete Refresh Tokens by Application ID

Delete Refresh Tokens by User ID

Delete Refresh Tokens by User and Application ID

Delete Refresh Token by Token ID

Delete Refresh Token by Token String

Request Headers

Request Parameters

Response

Response Codes

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.

Authorization

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.

Error Handling

The service includes comprehensive error handling, throwing appropriate exceptions for various scenarios such as:

Response Format

All endpoints return a standardized response object containing: