issueJWT method
Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid access token is properly signed and not expired.
This API may be used in an SSO configuration to issue new tokens for another application after the user has obtained a valid token from authentication.
@param {String} applicationId The Application Id for which you are requesting a new access token be issued. @param {String} encodedJWT The encoded JWT (access token). @param {String} refreshToken (Optional) An existing refresh token used to request a refresh token in addition to a JWT in the response.
The target application represented by the applicationId request parameter must have refresh tokens enabled in order to receive a refresh token in the response.
@returns {PromiseImplementation
Future<ClientResponse<IssueResponse, Errors>> issueJWT(
String applicationId, String encodedJWT, String refreshToken) {
return _startAnonymous<IssueResponse, Errors>()
.withUri('/api/jwt/issue')
.withAuthorization('Bearer ' + encodedJWT)
.withParameter('applicationId', applicationId)
.withParameter('refreshToken', refreshToken)
.withMethod('GET')
.withResponseHandler(
defaultResponseHandlerBuilder((d) => IssueResponse.fromJson(d)))
.go();
}