Class IDTokenReissueResponse

  • All Implemented Interfaces:
    Serializable

    public class IDTokenReissueResponse
    extends ApiResponse
    A response from Authlete's /idtoken/reissue API.

    A response from the /idtoken/reissue API can be mapped to this class. The API caller should extract the value of the "action" parameter from the API response and take the next action based on the value of the parameter.


    action = OK

    The action value OK means that an ID token has been reissued successfully. In this case, the implementation of the token endpoint should return a successful response to the client application. The HTTP status code and the content type of the response should be 200 and application/json, respectively. The value of the responseContent parameter can be used as the message body of the response.

     HTTP/1.1 200 OK
     Content-Type: application/json
     Cache-Control: no-store
    
     (Put the value of the "responseContent" parameter here.)
     

    action = INTERNAL_SERVER_ERROR

    The action value INTERNAL_SERVER_ERROR means that something wrong happened on Authlete side. In this case, the implementation of the token endpoint should return an error response to the client application. The HTTP status code and the content type of the error response should be 500 and application/json, respectively. The value of the responseContent parameter can be used as the message body of the error response.

     HTTP/1.1 500 Internal Server Error
     Content-Type: application/json
     Cache-Control: no-store
    
     (Put the value of the "responseContent" parameter here.)
     

    Note that, however, in real production deployments, it may be better to return a vaguer error response instead of a bare one like above.


    action = CALLER_ERROR

    The action value CALLER_ERROR means that the API call is wrong. For example, the "accessToken" request parameter is missing.

    Caller errors should be solved before the service is deployed in a production environment.

    Since:
    3.68, Authlete 2.3.8
    See Also:
    OpenID Connect Core 1.0, 12.2. Successful Refresh Response, IDTokenReissueRequest, Serialized Form
    • Constructor Detail

      • IDTokenReissueResponse

        public IDTokenReissueResponse()
    • Method Detail

      • getAction

        public IDTokenReissueResponse.Action getAction()
        Get the next action that the implementation of the token endpoint should take.
        Returns:
        The next action that the implementation of the token endpoint should take.
      • setAction

        public IDTokenReissueResponse setAction​(IDTokenReissueResponse.Action action)
        Set the next action that the implementation of the token endpoint should take.
        Parameters:
        action - The next action that the implementation of the token endpoint should take.
        Returns:
        this object.
      • getResponseContent

        public String getResponseContent()
        Get the response content that can be used as the message body of the token response that should be returned from the token endpoint.
        Returns:
        The response content.
      • setResponseContent

        public IDTokenReissueResponse setResponseContent​(String responseContent)
        Set the response content that can be used as the message body of the token response that should be returned from the token endpoint.
        Parameters:
        responseContent - The response content.
        Returns:
        this object.
      • getIdToken

        public String getIdToken()
        Get the reissued ID token.
        Returns:
        The reissued ID token in the JWS compact serialization format.
      • setIdToken

        public IDTokenReissueResponse setIdToken​(String idToken)
        Set the reissued ID token.
        Parameters:
        idToken - The reissued ID token in the JWS compact serialization format.
        Returns:
        this object.