Class TokenRequestHandler.Params
- java.lang.Object
-
- com.authlete.jaxrs.TokenRequestHandler.Params
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- TokenRequestHandler
public static class TokenRequestHandler.Params extends Object implements Serializable
Parameters passed to theTokenRequestHandler.handle(Params)method.- Since:
- 2.27
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Params()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorization()Get the value of theAuthorizationheader in the token request.StringgetClientAttestation()Get the value of theOAuth-Client-AttestationHTTP header.StringgetClientAttestationPop()Get the value of theOAuth-Client-Attestation-PoPHTTP header.String[]getClientCertificatePath()Get the path of the client's certificate, each in PEM format.StringgetDpop()Get the DPoP proof JWT (the value of theDPoPHTTP header).StringgetHtm()Get the HTTP method of the token request.StringgetHtu()Get the URL of the token endpoint.javax.ws.rs.core.MultivaluedMap<String,String>getParameters()Get the request parameters of the token request.TokenRequestHandler.ParamssetAuthorization(String authorization)Set the value of theAuthorizationheader in the token request.TokenRequestHandler.ParamssetClientAttestation(String jwt)Set the value of theOAuth-Client-AttestationHTTP header.TokenRequestHandler.ParamssetClientAttestationPop(String jwt)Set the value of theOAuth-Client-Attestation-PoPHTTP header.TokenRequestHandler.ParamssetClientCertificatePath(String[] path)Set the path of the client's certificate, each in PEM format.TokenRequestHandler.ParamssetDpop(String dpop)Set the DPoP proof JWT (the value of theDPoPHTTP header).TokenRequestHandler.ParamssetHtm(String htm)Set the HTTP method of the token request.TokenRequestHandler.ParamssetHtu(String htu)Set the URL of the token endpoint.TokenRequestHandler.ParamssetParameters(javax.ws.rs.core.MultivaluedMap<String,String> parameters)Set the request parameters of the token request.
-
-
-
Method Detail
-
getParameters
public javax.ws.rs.core.MultivaluedMap<String,String> getParameters()
Get the request parameters of the token request.- Returns:
- The request parameters of the token request.
-
setParameters
public TokenRequestHandler.Params setParameters(javax.ws.rs.core.MultivaluedMap<String,String> parameters)
Set the request parameters of the token request.- Parameters:
parameters- The request parameters of the token request.- Returns:
thisobject.
-
getAuthorization
public String getAuthorization()
Get the value of theAuthorizationheader in the token request. A pair of client ID and client secret is embedded there when the client authentication method isclient_secret_basic.- Returns:
- The value of the
Authorizationheader.
-
setAuthorization
public TokenRequestHandler.Params setAuthorization(String authorization)
Set the value of theAuthorizationheader in the token request. A pair of client ID and client secret is embedded there when the client authentication method isclient_secret_basic.- Parameters:
authorization- The value of theAuthorizationheader.- Returns:
thisobject.
-
getClientCertificatePath
public String[] getClientCertificatePath()
Get the path of the client's certificate, each in PEM format. The first item in the array is the client's certificate itself.- Returns:
- The path of the client's certificate.
- See Also:
- RFC 8705: OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
-
setClientCertificatePath
public TokenRequestHandler.Params setClientCertificatePath(String[] path)
Set the path of the client's certificate, each in PEM format. The first item in the array is the client's certificate itself.- Parameters:
path- The path of the client's certificate.- Returns:
thisobject.- See Also:
- RFC 8705: OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
-
getDpop
public String getDpop()
Get the DPoP proof JWT (the value of theDPoPHTTP header).See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
- Returns:
- The DPoP proof JWT.
-
setDpop
public TokenRequestHandler.Params setDpop(String dpop)
Set the DPoP proof JWT (the value of theDPoPHTTP header).See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
- Parameters:
dpop- The DPoP proof JWT.- Returns:
thisobject.
-
getHtm
public String getHtm()
Get the HTTP method of the token request.- Returns:
- The HTTP method of the token request.
-
setHtm
public TokenRequestHandler.Params setHtm(String htm)
Set the HTTP method of the token request.The value should be
"POST"unless new specifications allowing other HTTP methods at the token endpoint are developed. If this parameter is omitted,"POST"is used as the default value.The value passed here will be used to validate the DPoP proof JWT. See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
- Parameters:
htm- The HTTP method of the token request.- Returns:
thisobject.
-
getHtu
public String getHtu()
Get the URL of the token endpoint.- Returns:
- The URL of the token endpoint.
-
setHtu
public TokenRequestHandler.Params setHtu(String htu)
Set the URL of the token endpoint.If this parameter is omitted, the
tokenEndpointproperty ofServicewill be used as the default value.The value passed here will be used to validate the DPoP proof JWT. See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
- Parameters:
htu- The URL of the token endpoint.- Returns:
thisobject.
-
getClientAttestation
public String getClientAttestation()
Get the value of theOAuth-Client-AttestationHTTP header.- Returns:
- The value of the
OAuth-Client-AttestationHTTP header. - Since:
- 2.79, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
setClientAttestation
public TokenRequestHandler.Params setClientAttestation(String jwt)
Set the value of theOAuth-Client-AttestationHTTP header.- Parameters:
jwt- The value of theOAuth-Client-AttestationHTTP header.- Returns:
thisobject.- Since:
- 2.79, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
getClientAttestationPop
public String getClientAttestationPop()
Get the value of theOAuth-Client-Attestation-PoPHTTP header.- Returns:
- The value of the
OAuth-Client-Attestation-PoPHTTP header. - Since:
- 2.79, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
setClientAttestationPop
public TokenRequestHandler.Params setClientAttestationPop(String jwt)
Set the value of theOAuth-Client-Attestation-PoPHTTP header.- Parameters:
jwt- The value of theOAuth-Client-Attestation-PoPHTTP header.- Returns:
thisobject.- Since:
- 2.79, Authlete 3.0
- See Also:
- OAuth 2.0 Attestation-Based Client Authentication
-
-