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_reqAPI.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
Authorizationheader 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
Authorizationheader, the value should be extracted and set to this parameter. clientSecret(OPTIONAL)-
The client secret extracted from the
Authorizationheader 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
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 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
DPoPHTTP 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
pushedAuthReqEndpointproperty ofServiceis 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
nonceclaim. Even if the service'sdpopNonceRequiredproperty is false, calling the/pushed_auth_reqAPI with thisdpopNonceRequiredparameter 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-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.51
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PushedAuthReqRequest()
-
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 pushed authorization request endpoint.String[]getClientCertificatePath()Get the client certificate path presented by the client during client authentication.StringgetClientId()Get the client ID extracted from theAuthorizationheader of the request to the pushed authorization request endpoint.StringgetClientSecret()Get the client secret extracted from theAuthorizationheader of the request to the pushed authorization request endpoint.StringgetDpop()Get theDPoPheader presented by the client during the request to the PAR endpoint.StringgetHtm()Get the HTTP method of the pushed authorization request.StringgetHtu()Get the URL of the PAR endpoint.StringgetOauthClientAttestation()Get the value of theOAuth-Client-AttestationHTTP header.StringgetOauthClientAttestationPop()Get the value of theOAuth-Client-Attestation-PoPHTTP header.StringgetParameters()Get the request parameters that the pushed authorization request endpoint received from the client application.booleanisDpopNonceRequired()Get the flag indicating whether to check if the DPoP proof JWT includes the expectednoncevalue.PushedAuthReqRequestsetClientCertificate(String certificate)Set the client certificate used in the TLS connection between the client application and the pushed authorization request endpoint.PushedAuthReqRequestsetClientCertificatePath(String[] path)Set the client certificate path presented by the client during client authentication.PushedAuthReqRequestsetClientId(String clientId)Set the client ID extracted from theAuthorizationheader of the request to the pushed authorization request endpoint.PushedAuthReqRequestsetClientSecret(String clientSecret)Set the client secret extracted from theAuthorizationheader of the request to the pushed authorization request endpoint.PushedAuthReqRequestsetDpop(String dpop)Set theDPoPheader presented by the client during the request to the PAR endpoint.PushedAuthReqRequestsetDpopNonceRequired(boolean required)Set the flag indicating whether to check if the DPoP proof JWT includes the expectednoncevalue.PushedAuthReqRequestsetHtm(String htm)Set the HTTP method of the pushed authorization request.PushedAuthReqRequestsetHtu(String htu)Set the URL of the PAR endpoint.PushedAuthReqRequestsetOauthClientAttestation(String jwt)Set the value of theOAuth-Client-AttestationHTTP header.PushedAuthReqRequestsetOauthClientAttestationPop(String jwt)Set the value of theOAuth-Client-Attestation-PoPHTTP header.PushedAuthReqRequestsetParameters(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-urlencodedformat.
-
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-urlencodedformat.- Returns:
thisobject.
-
getClientId
public String getClientId()
Get the client ID extracted from theAuthorizationheader 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 theAuthorizationheader of the request to the pushed authorization request endpoint.- Parameters:
clientId- The client ID.- Returns:
thisobject.
-
getClientSecret
public String getClientSecret()
Get the client secret extracted from theAuthorizationheader 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 theAuthorizationheader of the request to the pushed authorization request endpoint.- 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 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:
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 PushedAuthReqRequest setClientCertificatePath(String[] path)
Set the client certificate path presented by the client during client authentication.- Parameters:
path- The client certificate path.- Returns:
thisobject.
-
getDpop
public String getDpop()
Get theDPoPheader 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
DPoPheader string. - Since:
- 3.47
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setDpop
public PushedAuthReqRequest setDpop(String dpop)
Set theDPoPheader 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- TheDPoPheader string.- Returns:
thisobject.- 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 theDPoPheader.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 theDPoPheader.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:
thisobject.- 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 theDPoPheader.If this parameter is omitted, the
pushedAuthReqEndpointproperty of theServiceis 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 theDPoPheader.If this parameter is omitted, the
pushedAuthReqEndpointproperty of theServiceis 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:
thisobject.- 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 expectednoncevalue.If this request parameter is
trueor if the service'sdpopNonceRequiredproperty (Service.isDpopNonceRequired()) istrue, the/pushed_auth_reqAPI checks if the DPoP proof JWT includes the expectednoncevalue. In this case, the response from the/pushed_auth_reqAPI will include thedpopNonceresponse parameter, which should be used as the value of theDPoP-NonceHTTP header.- Returns:
trueif the/pushed_auth_reqAPI checks whether the DPoP proof JWT includes the expectednoncevalue, even if the service'sdpopNonceRequiredproperty 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 expectednoncevalue.If this request parameter is
trueor if the service'sdpopNonceRequiredproperty (Service.isDpopNonceRequired()) istrue, the/pushed_auth_reqAPI checks if the DPoP proof JWT includes the expectednoncevalue. In this case, the response from the/pushed_auth_reqAPI will include thedpopNonceresponse parameter, which should be used as the value of theDPoP-NonceHTTP header.- Parameters:
required-trueto have the/pushed_auth_reqAPI check whether the DPoP proof JWT includes the expectednoncevalue, even if the service'sdpopNonceRequiredproperty is false.- Returns:
thisobject.- 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-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 PushedAuthReqRequest 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 PushedAuthReqRequest 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
-
-