Class AuthorizationRequest
- java.lang.Object
-
- com.authlete.common.dto.AuthorizationRequest
-
- All Implemented Interfaces:
Serializable
public class AuthorizationRequest extends Object implements Serializable
Request to Authlete's/auth/authorizationAPI.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 inapplication/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 Summary
Constructors Constructor Description AuthorizationRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContext()Get the arbitrary text to be attached to the ticket that will be issued from the/auth/authorizationAPI.StringgetParameters()Get the value ofparameterswhich are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.AuthorizationRequestsetContext(String context)Set the arbitrary text to be attached to the ticket that will be issued from the/auth/authorizationAPI.AuthorizationRequestsetParameters(String parameters)Set the value ofparameterswhich are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.AuthorizationRequestsetParameters(Map<String,String[]> parameters)Set the value ofparameterswhich are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.
-
-
-
Method Detail
-
getParameters
public String getParameters()
Get the value ofparameterswhich 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-urlencodedformat.
-
setParameters
public AuthorizationRequest setParameters(String parameters)
Set the value ofparameterswhich are the request parameters that the OAuth 2.0 authorization endpoint of the service implementation received from the client application.- Parameters:
parameters- Request parameters inx-www-form-urlencodedformat.- Returns:
thisobject.
-
setParameters
public AuthorizationRequest setParameters(Map<String,String[]> parameters)
Set the value ofparameterswhich 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-urlencodedformat and passes it tosetParameters(String)method.- Parameters:
parameters- Request parameters.- Returns:
thisobject.- Since:
- 1.24
-
getContext
public String getContext()
Get the arbitrary text to be attached to the ticket that will be issued from the/auth/authorizationAPI.The text can be retrieved later by the
/auth/authorization/ticket/infoAPI and can be updated by the/auth/authorization/ticket/updateAPI.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/authorizationAPI.The text can be retrieved later by the
/auth/authorization/ticket/infoAPI and can be updated by the/auth/authorization/ticket/updateAPI.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:
thisobject.- Since:
- 3.88, Authlete 3.0
-
-