Class AuthorizationRequest

  • All Implemented Interfaces:
    Serializable

    public class AuthorizationRequest
    extends Object
    implements Serializable
    Request to Authlete's /auth/authorization API.
    parameters (REQUIRED)

    OAuth 2.0 authorization request parameters which are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.

    The value of "parameters" is (1) the entire query string when the HTTP method of the request from the client application is "GET" or (2) the entire entity body (which is formatted in application/x-www-form-urlencoded) when the HTTP method of the request from the client application is "POST".

    Author:
    Takahiko Kawasaki
    See Also:
    Serialized Form
    • Constructor Detail

      • AuthorizationRequest

        public AuthorizationRequest()
    • Method Detail

      • getParameters

        public String getParameters()
        Get the value of parameters which are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.
        Returns:
        Request parameters in x-www-form-urlencoded format.
      • setParameters

        public AuthorizationRequest setParameters​(String parameters)
        Set the value of parameters which are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.
        Parameters:
        parameters - Request parameters in x-www-form-urlencoded format.
        Returns:
        this object.
      • setParameters

        public AuthorizationRequest setParameters​(Map<String,​String[]> parameters)
        Set the value of parameters which are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.

        This method converts the given map into a string in x-www-form-urlencoded format and passes it to setParameters(String) method.

        Parameters:
        parameters - Request parameters.
        Returns:
        this object.
        Since:
        1.24
      • getContext

        public String getContext()
        Get the arbitrary text to be attached to the ticket that will be issued from the /auth/authorization API.

        The text can be retrieved later by the /auth/authorization/ticket/info API and can be updated by the /auth/authorization/ticket/update API.

        The text will be compressed and encrypted when it is saved in the Authlete database.

        Returns:
        The arbitrary text to be attached to the ticket.
        Since:
        3.88, Authlete 3.0
      • setContext

        public AuthorizationRequest setContext​(String context)
        Set the arbitrary text to be attached to the ticket that will be issued from the /auth/authorization API.

        The text can be retrieved later by the /auth/authorization/ticket/info API and can be updated by the /auth/authorization/ticket/update API.

        The text will be compressed and encrypted when it is saved in the Authlete database.

        Parameters:
        context - The arbitrary text to be attached to the ticket.
        Returns:
        this object.
        Since:
        3.88, Authlete 3.0