Class PushedAuthReqRequest
- java.lang.Object
-
- com.authlete.common.dto.PushedAuthReqRequest
-
- All Implemented Interfaces:
Serializable
public class PushedAuthReqRequest extends Object implements Serializable
Request to Authlete's/api/pushed_auth_req
API.The authorization server can implement a pushed authorization request endpoint which is defined in "OAuth 2.0 Pushed Authorization Requests" by using the Authlete API.
Request parameters to the API are as follows.
parameters
(REQUIRED)-
Request parameters that the pushed authorization request endpoint of the authorization server implementation received from the client application. Its format is
application/x-www-form-urlencoded
. clientId
(OPTIONAL)-
The client ID extracted from the
Authorization
header of the request to the pushed authorization request endpoint.If the pushed authorization request 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 the
Authorization
header, the value should be extracted and set to this parameter. clientSecret
(OPTIONAL)-
The client secret extracted from the
Authorization
header of the request to the pushed authorization request endpoint.If the pushed authorization request 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 the
Authorization
header, 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 pushed authorization request 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.
dpop
(OPTIONAL)-
The value of the
DPoP
HTTP header. See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details. htm
(OPTIONAL)-
The HTTP method of the PAR request. In normal cases, the value is
"POST"
. When this parameter is omitted,"POST"
is used as the default value. See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details. htu
(OPTIONAL)-
The URL of the PAR endpoint, without query or path components. If omitted, the
pushedAuthReqEndpoint
property ofService
is used as the default value. See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details. dpopNonceRequired
(OPTIONAL; Authlete 3.0 onwards)-
The flag indicating whether to require the DPoP proof JWT to include the
nonce
claim. Even if the service'sdpopNonceRequired
property is false, calling the/pushed_auth_req
API with thisdpopNonceRequired
parameter true will force the Authlete API to check whether the DPoP proof JWT includes the expected nonce value. oauthClientAttestation
(OPTIONAL; Authlete 3.0 onwards)-
The value of the
OAuth-Client-Attestation
HTTP 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-PoP
HTTP header, which is defined in the specification of OAuth 2.0 Attestation-Based Client Authentication.
- Since:
- 2.51
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PushedAuthReqRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClientCertificate()
Get the client certificate used in the TLS connection between the client application and the pushed authorization request endpoint.String[]
getClientCertificatePath()
Get the client certificate path presented by the client during client authentication.String
getClientId()
Get the client ID extracted from theAuthorization
header of the request to the pushed authorization request endpoint.String
getClientSecret()
Get the client secret extracted from theAuthorization
header of the request to the pushed authorization request endpoint.String
getDpop()
Get theDPoP
header presented by the client during the request to the PAR endpoint.String
getHtm()
Get the HTTP method of the pushed authorization request.String
getHtu()
Get the URL of the PAR endpoint.String
getOauthClientAttestation()
Get the value of theOAuth-Client-Attestation
HTTP header.String
getOauthClientAttestationPop()
Get the value of theOAuth-Client-Attestation-PoP
HTTP header.String
getParameters()
Get the request parameters that the pushed authorization request endpoint received from the client application.boolean
isDpopNonceRequired()
Get the flag indicating whether to check if the DPoP proof JWT includes the expectednonce
value.PushedAuthReqRequest
setClientCertificate(String certificate)
Set the client certificate used in the TLS connection between the client application and the pushed authorization request endpoint.PushedAuthReqRequest
setClientCertificatePath(String[] path)
Set the client certificate path presented by the client during client authentication.PushedAuthReqRequest
setClientId(String clientId)
Set the client ID extracted from theAuthorization
header of the request to the pushed authorization request endpoint.PushedAuthReqRequest
setClientSecret(String clientSecret)
Set the client secret extracted from theAuthorization
header of the request to the pushed authorization request endpoint.PushedAuthReqRequest
setDpop(String dpop)
Set theDPoP
header presented by the client during the request to the PAR endpoint.PushedAuthReqRequest
setDpopNonceRequired(boolean required)
Set the flag indicating whether to check if the DPoP proof JWT includes the expectednonce
value.PushedAuthReqRequest
setHtm(String htm)
Set the HTTP method of the pushed authorization request.PushedAuthReqRequest
setHtu(String htu)
Set the URL of the PAR endpoint.PushedAuthReqRequest
setOauthClientAttestation(String jwt)
Set the value of theOAuth-Client-Attestation
HTTP header.PushedAuthReqRequest
setOauthClientAttestationPop(String jwt)
Set the value of theOAuth-Client-Attestation-PoP
HTTP header.PushedAuthReqRequest
setParameters(String parameters)
Set the request parameters that the pushed authorization request endpoint received from the client application.
-
-
-
Method Detail
-
getParameters
public String getParameters()
Get the request parameters that the pushed authorization request endpoint received from the client application.- Returns:
- Request parameters in
application/x-www-form-urlencoded
format.
-
setParameters
public PushedAuthReqRequest setParameters(String parameters)
Set the request parameters that the pushed authorization request endpoint received from the client application.- Parameters:
parameters
- Request parameters inapplication/x-www-form-urlencoded
format.- Returns:
this
object.
-
getClientId
public String getClientId()
Get the client ID extracted from theAuthorization
header of the request to the pushed authorization request endpoint.- Returns:
- The client ID.
-
setClientId
public PushedAuthReqRequest setClientId(String clientId)
Set the client ID extracted from theAuthorization
header of the request to the pushed authorization request endpoint.- Parameters:
clientId
- The client ID.- Returns:
this
object.
-
getClientSecret
public String getClientSecret()
Get the client secret extracted from theAuthorization
header of the request to the pushed authorization request endpoint.- Returns:
- The client secret.
-
setClientSecret
public PushedAuthReqRequest setClientSecret(String clientSecret)
Set the client secret extracted from theAuthorization
header of the request to the pushed authorization request endpoint.- Parameters:
clientSecret
- The client secret.- Returns:
this
object.
-
getClientCertificate
public String getClientCertificate()
Get the client certificate used in the TLS connection between the client application and the pushed authorization request endpoint.- Returns:
- The client certificate.
-
setClientCertificate
public PushedAuthReqRequest setClientCertificate(String certificate)
Set the client certificate used in the TLS connection between the client application and the pushed authorization request endpoint.- Parameters:
certificate
- The client certificate.- Returns:
this
object.
-
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 PushedAuthReqRequest setClientCertificatePath(String[] path)
Set the client certificate path presented by the client during client authentication.- Parameters:
path
- The client certificate path.- Returns:
this
object.
-
getDpop
public String getDpop()
Get theDPoP
header presented by the client during the request to the PAR endpoint. The header contains a signed JWT which includes the public key that is paired with the private key used to sign the JWT.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Returns:
- The
DPoP
header string. - Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setDpop
public PushedAuthReqRequest setDpop(String dpop)
Set theDPoP
header presented by the client during the request to the PAR endpoint. The header contains a signed JWT which includes the public key that is paired with the private key used to sign the JWT.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Parameters:
dpop
- TheDPoP
header string.- Returns:
this
object.- Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
getHtm
public String getHtm()
Get the HTTP method of the pushed authorization request. This field is used to validate theDPoP
header.In normal cases, the value is
"POST"
. When this parameter is omitted,"POST"
is used as the default value.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Returns:
- The HTTP method as a string. For example,
"POST"
. - Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setHtm
public PushedAuthReqRequest setHtm(String htm)
Set the HTTP method of the pushed authorization request. This field is used to validate theDPoP
header.In normal cases, the value is
"POST"
. When this parameter is omitted,"POST"
is used as the default value.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Parameters:
htm
- The HTTP method as a string. For example,"POST"
.- Returns:
this
object.- Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
getHtu
public String getHtu()
Get the URL of the PAR endpoint. This field is used to validate theDPoP
header.If this parameter is omitted, the
pushedAuthReqEndpoint
property of theService
is used as the default value.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Returns:
- The URL of the PAR endpoint.
- Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setHtu
public PushedAuthReqRequest setHtu(String htu)
Set the URL of the PAR endpoint. This field is used to validate theDPoP
header.If this parameter is omitted, the
pushedAuthReqEndpoint
property of theService
is used as the default value.See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.
- Parameters:
htu
- The URL of the PAR endpoint.- Returns:
this
object.- Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
isDpopNonceRequired
public boolean isDpopNonceRequired()
Get the flag indicating whether to check if the DPoP proof JWT includes the expectednonce
value.If this request parameter is
true
or if the service'sdpopNonceRequired
property (Service.isDpopNonceRequired()
) istrue
, the/pushed_auth_req
API checks if the DPoP proof JWT includes the expectednonce
value. In this case, the response from the/pushed_auth_req
API will include thedpopNonce
response parameter, which should be used as the value of theDPoP-Nonce
HTTP header.- Returns:
true
if the/pushed_auth_req
API checks whether the DPoP proof JWT includes the expectednonce
value, even if the service'sdpopNonceRequired
property is false.- Since:
- 3.82, Authlete 3.0
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setDpopNonceRequired
public PushedAuthReqRequest setDpopNonceRequired(boolean required)
Set the flag indicating whether to check if the DPoP proof JWT includes the expectednonce
value.If this request parameter is
true
or if the service'sdpopNonceRequired
property (Service.isDpopNonceRequired()
) istrue
, the/pushed_auth_req
API checks if the DPoP proof JWT includes the expectednonce
value. In this case, the response from the/pushed_auth_req
API will include thedpopNonce
response parameter, which should be used as the value of theDPoP-Nonce
HTTP header.- Parameters:
required
-true
to have the/pushed_auth_req
API check whether the DPoP proof JWT includes the expectednonce
value, even if the service'sdpopNonceRequired
property is false.- Returns:
this
object.- Since:
- 3.82, Authlete 3.0
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
getOauthClientAttestation
public String getOauthClientAttestation()
Get the value of theOAuth-Client-Attestation
HTTP header.- Returns:
- The value of the
OAuth-Client-Attestation
HTTP header. - Since:
- 4.3, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
setOauthClientAttestation
public PushedAuthReqRequest setOauthClientAttestation(String jwt)
Set the value of theOAuth-Client-Attestation
HTTP header.- Parameters:
jwt
- The value of theOAuth-Client-Attestation
HTTP header.- Returns:
this
object.- 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-PoP
HTTP header.- Returns:
- The value of the
OAuth-Client-Attestation-PoP
HTTP header. - Since:
- 4.3, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
setOauthClientAttestationPop
public PushedAuthReqRequest setOauthClientAttestationPop(String jwt)
Set the value of theOAuth-Client-Attestation-PoP
HTTP header.- Parameters:
jwt
- The value of theOAuth-Client-Attestation-PoP
HTTP header.- Returns:
this
object.- Since:
- 4.3, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
-