Class DeviceAuthorizationRequest
- java.lang.Object
 - 
- com.authlete.common.dto.DeviceAuthorizationRequest
 
 
- 
- All Implemented Interfaces:
 Serializable
public class DeviceAuthorizationRequest extends Object implements Serializable
Request to Authlete's/api/device/authorizationAPI.When the implementation of the device authorization endpoint of the authorization server receives a device authorization request from a client application, the first step is to call Authlete's
/api/device/authorizationAPI. The API will parse the device authorization request on behalf of the implementation of the device authorization endpoint.parameters(REQUIRED)- 
 
Parameters of a device authorization request which are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.
The value of
"parameters"is the entire entity body (which is formatted inapplication/x-www-form-urlencoded) of the request from the client application. clientId(OPTIONAL)- 
 
The client ID extracted from
Authorizationheader of the device authorization request from the client application.If the device authorization endpoint of the authorization server implementation supports Basic Authentication as a means of client authentication, and the request from the client application contained its client ID in
Authorizationheader, the value should be extracted and set to this parameter. clientSecret(OPTIONAL)- 
 
The client secret extracted from
Authorizationheader of the device authorization request from the client application.If the device authorization endpoint of the authorization server implementation supports Basic Authentication as a means of client authentication, and the request from the client application contained its client secret in
Authorizationheader, the value should be extracted and set to this parameter. clientCertificate(OPTIONAL)- 
 
The client certificate used in the TLS connection between the client application and the device authorization endpoint of the authorization server.
 clientCertificatePath(OPTIONAL)- 
 
The client certificate path presented by the client during client authentication. Each element is a string in PEM format.
 oauthClientAttestation(OPTIONAL; Authlete 3.0 onwards)- 
 
The value of the
OAuth-Client-AttestationHTTP header, which is defined in the specification of OAuth 2.0 Attestation-Based Client Authentication. oauthClientAttestationPop(OPTIONAL; Authlete 3.0 onwards)- 
 
The value of the
OAuth-Client-Attestation-PoPHTTP header, which is defined in the specification of OAuth 2.0 Attestation-Based Client Authentication. 
- Since:
 - 2.42
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description DeviceAuthorizationRequest() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientCertificate()Get the client certificate used in the TLS connection between the client application and the device authorization endpoint of the authorization server.String[]getClientCertificatePath()Get the client certificate path presented by the client during client authentication.StringgetClientId()Get the client ID extracted fromAuthorizationheader of the device authorization request from the client application.StringgetClientSecret()Get the client secret extracted fromAuthorizationheader of the device authorization request from the client application.StringgetOauthClientAttestation()Get the value of theOAuth-Client-AttestationHTTP header.StringgetOauthClientAttestationPop()Get the value of theOAuth-Client-Attestation-PoPHTTP header.StringgetParameters()Get the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.DeviceAuthorizationRequestsetClientCertificate(String certificate)Set the client certificate used in the TLS connection between the client application and the device authorization endpoint of the authorization server.DeviceAuthorizationRequestsetClientCertificatePath(String[] path)Set the client certificate path presented by the client during client authentication.DeviceAuthorizationRequestsetClientId(String clientId)Set the client ID extracted fromAuthorizationheader of the device authorization request from the client application.DeviceAuthorizationRequestsetClientSecret(String clientSecret)Set the client secret extracted fromAuthorizationheader of the device authorization request from the client application.DeviceAuthorizationRequestsetOauthClientAttestation(String jwt)Set the value of theOAuth-Client-AttestationHTTP header.DeviceAuthorizationRequestsetOauthClientAttestationPop(String jwt)Set the value of theOAuth-Client-Attestation-PoPHTTP header.DeviceAuthorizationRequestsetParameters(String parameters)Set the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.DeviceAuthorizationRequestsetParameters(Map<String,String[]> parameters)Set the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application. 
 - 
 
- 
- 
Method Detail
- 
getParameters
public String getParameters()
Get the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.- Returns:
 - Request parameters in 
application/x-www-form-urlencodedformat. 
 
- 
setParameters
public DeviceAuthorizationRequest setParameters(String parameters)
Set the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.- Parameters:
 parameters- Request parameters inapplication/x-www-form-urlencodedformat.- Returns:
 thisobject.
 
- 
setParameters
public DeviceAuthorizationRequest setParameters(Map<String,String[]> parameters)
Set the value ofparameterswhich are the request parameters that the device authorization endpoint of the authorization server implementation received from the client application.This method converts the given map into a string in
application/x-www-form-urlencodedand passes it tosetParameters(String)method.- Parameters:
 parameters- Request parameters.- Returns:
 thisobject.
 
- 
getClientId
public String getClientId()
Get the client ID extracted fromAuthorizationheader of the device authorization request from the client application.- Returns:
 - The client ID.
 
 
- 
setClientId
public DeviceAuthorizationRequest setClientId(String clientId)
Set the client ID extracted fromAuthorizationheader of the device authorization request from the client application.- Parameters:
 clientId- The client ID.- Returns:
 thisobject.
 
- 
getClientSecret
public String getClientSecret()
Get the client secret extracted fromAuthorizationheader of the device authorization request from the client application.- Returns:
 - The client secret.
 
 
- 
setClientSecret
public DeviceAuthorizationRequest setClientSecret(String clientSecret)
Set the client secret extracted fromAuthorizationheader of the device authorization request from the client application.- Parameters:
 clientSecret- The client secret.- Returns:
 thisobject.
 
- 
getClientCertificate
public String getClientCertificate()
Get the client certificate used in the TLS connection between the client application and the device authorization endpoint of the authorization server.- Returns:
 - The client certificate.
 
 
- 
setClientCertificate
public DeviceAuthorizationRequest setClientCertificate(String certificate)
Set the client certificate used in the TLS connection between the client application and the device authorization endpoint of the authorization server.- Parameters:
 certificate- The client certificate- Returns:
 thisobject.
 
- 
getClientCertificatePath
public String[] getClientCertificatePath()
Get the client certificate path presented by the client during client authentication.- Returns:
 - The client certificate path. Each element is a string in PEM format.
 
 
- 
setClientCertificatePath
public DeviceAuthorizationRequest setClientCertificatePath(String[] path)
Set the client certificate path presented by the client during client authentication.- Parameters:
 path- The client certificate path.- Returns:
 thisobject.
 
- 
getOauthClientAttestation
public String getOauthClientAttestation()
Get the value of theOAuth-Client-AttestationHTTP header.- Returns:
 - The value of the 
OAuth-Client-AttestationHTTP header. - Since:
 - 4.3, Authlete 3.0
 - See Also:
 - OAuth 2.0 Attestation-Based Client Authentication
 
 
- 
setOauthClientAttestation
public DeviceAuthorizationRequest setOauthClientAttestation(String jwt)
Set the value of theOAuth-Client-AttestationHTTP header.- Parameters:
 jwt- The value of theOAuth-Client-AttestationHTTP header.- Returns:
 thisobject.- Since:
 - 4.3, Authlete 3.0
 - See Also:
 - OAuth 2.0 Attestation-Based Client Authentication
 
 
- 
getOauthClientAttestationPop
public String getOauthClientAttestationPop()
Get the value of theOAuth-Client-Attestation-PoPHTTP header.- Returns:
 - The value of the 
OAuth-Client-Attestation-PoPHTTP header. - Since:
 - 4.3, Authlete 3.0
 - See Also:
 - OAuth 2.0 Attestation-Based Client Authentication
 
 
- 
setOauthClientAttestationPop
public DeviceAuthorizationRequest setOauthClientAttestationPop(String jwt)
Set the value of theOAuth-Client-Attestation-PoPHTTP header.- Parameters:
 jwt- The value of theOAuth-Client-Attestation-PoPHTTP header.- Returns:
 thisobject.- Since:
 - 4.3, Authlete 3.0
 - See Also:
 - OAuth 2.0 Attestation-Based Client Authentication
 
 
 - 
 
 -