Class GMRequest
- java.lang.Object
-
- com.authlete.common.dto.GMRequest
-
- All Implemented Interfaces:
Serializable
public class GMRequest extends Object implements Serializable
Request to Authlete's/api/gmAPI.gmAction(REQUIRED)-
The grant management action of the grant management request. Either
QUERYorREVOKE. grantId(REQUIRED)-
The grant ID of the grant management request.
accessToken(REQUIRED)-
The access token included in the grant management request.
clientCertificate(OPTIONAL)-
The client certificate used in the TLS connection established between the client application and the grant management endpoint. See "RFC 8705 OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens" for details.
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 grant management request. Either
"GET"or"DELETE". This parameter is used to validate the value of theDPoPHTTP header. See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.API callers don't have to specify this parameter unless they have a special reason because the default value can be easily determined based on the value of
gmAction. htu(OPTIONAL)-
The URL of the grant management endpoint. This parameter is used to validate the value of the
DPoPHTTP header. See RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) for details.When omitted, a string built by concatenating (1) the
grantManagementEndpointproperty of theService, (2) a slash (/) and (3) the grant ID is used as the default value. 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/auth/gmAPI with thisdpopNonceRequiredparameter true will force the Authlete API to check whether the DPoP proof JWT includes the expected nonce value.
- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GMRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccessToken()Get the access token which has come along with the grant management request from the client application.StringgetClientCertificate()Get the client certificate used in the TLS connection established between the client application and the grant management endpoint.StringgetDpop()Get the value of theDPoPheader of the grant management request.GMActiongetGmAction()Get the grant management action of the grant management request.StringgetGrantId()Get the grant ID of the grant management request.StringgetHtm()Get the HTTP method of the grant management request.StringgetHtu()Get the URL of the grant management endpoint.booleanisDpopNonceRequired()Get the flag indicating whether to check if the DPoP proof JWT includes the expectednoncevalue.GMRequestsetAccessToken(String accessToken)Set the access token that has come along with the grant management request from the client application.GMRequestsetClientCertificate(String certificate)Set the client certificate used in the TLS connection established between the client application and the grant management endpoint.GMRequestsetDpop(String dpop)Set the value of theDPoPheader of the grant management request.GMRequestsetDpopNonceRequired(boolean required)Set the flag indicating whether to check if the DPoP proof JWT includes the expectednoncevalue.GMRequestsetGmAction(GMAction gmAction)Set the grant management action of the grant management request.GMRequestsetGrantId(String grantId)Set the grant ID of the grant management request.GMRequestsetHtm(String htm)Set the HTTP method of the grant management request.GMRequestsetHtu(String htu)Set the URL of the grant management endpoint.
-
-
-
Method Detail
-
getGmAction
public GMAction getGmAction()
- Returns:
- The grant management action of the grant management request.
-
setGmAction
public GMRequest setGmAction(GMAction gmAction)
- Parameters:
gmAction- The grant management action of the grant management request.- Returns:
thisobject.
-
getGrantId
public String getGrantId()
Get the grant ID of the grant management request.- Returns:
- The grant ID.
-
setGrantId
public GMRequest setGrantId(String grantId)
Set the grant ID of the grant management request.- Parameters:
grantId- The grant ID.- Returns:
thisobject.
-
getAccessToken
public String getAccessToken()
Get the access token which has come along with the grant management request from the client application.- Returns:
- The access token.
-
setAccessToken
public GMRequest setAccessToken(String accessToken)
Set the access token that has come along with the grant management request from the client application.- Parameters:
accessToken- The access token.- Returns:
thisobject.
-
getClientCertificate
public String getClientCertificate()
Get the client certificate used in the TLS connection established between the client application and the grant management endpoint.This property is checked when the access token is bound to a client certificate. See RFC 8705 for details.
- Returns:
- The client certificate in PEM format.
- See Also:
- RFC 8705 OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
-
setClientCertificate
public GMRequest setClientCertificate(String certificate)
Set the client certificate used in the TLS connection established between the client application and the grant management endpoint.This property is checked when the access token is bound to a client certificate. See RFC 8705 for details.
- Parameters:
certificate- The client certificate in PEM format.- Returns:
thisobject.- See Also:
- RFC 8705 OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
-
getDpop
public String getDpop()
Get the value of theDPoPheader of the grant management request.This property is checked when the access token is bound to a public key.
- Returns:
- The value of the
DPoPheader. - See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setDpop
public GMRequest setDpop(String dpop)
Set the value of theDPoPheader of the grant management request.This property is checked when the access token is bound to a public key.
- Parameters:
dpop- The value of theDPoPheader.- Returns:
thisobject.- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
getHtm
public String getHtm()
Get the HTTP method of the grant management request.This property is used to validate the value of the
DPoPheader.When this property is omitted,
"GET"is used as the default value in the case ofgmAction=QUERY. Likewise,"DELETE"is used as the default value in the case ofgmAction=REVOKE.- Returns:
- The HTTP method of the grant management request.
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setHtm
public GMRequest setHtm(String htm)
Set the HTTP method of the grant management request.This property is used to validate the value of the
DPoPheader.When this property is omitted,
"GET"is used as the default value in the case ofgmAction=QUERY. Likewise,"DELETE"is used as the default value in the case ofgmAction=REVOKE.- Parameters:
htm- The HTTP method of the grant management request.- Returns:
thisobject.- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
getHtu
public String getHtu()
Get the URL of the grant management endpoint.This property is used to validate the value of the
DPoPheader.When this property is omitted, a string built by concatenating (1) the
grantManagementEndpointproperty of theService, (2) a slash (/) and (3) the grant ID is used as the default value.- Returns:
- The URL of the grant management endpoint.
- See Also:
- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
setHtu
public GMRequest setHtu(String htu)
Set the URL of the grant management endpoint.This property is used to validate the value of the
DPoPheader.When this property is omitted, a string built by concatenating (1) the
grantManagementEndpointproperty of theService, (2) a slash (/) and (3) the grant ID is used as the default value.- Parameters:
htu- The URL of the userinfo endpoint.- Returns:
thisobject.- 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/auth/gmAPI checks if the DPoP proof JWT includes the expectednoncevalue. In this case, the response from the/auth/gmAPI will include thedpopNonceresponse parameter, which should be used as the value of theDPoP-NonceHTTP header.- Returns:
trueif the/auth/gmAPI 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 GMRequest 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/auth/gmAPI checks if the DPoP proof JWT includes the expectednoncevalue. In this case, the response from the/auth/gmAPI will include thedpopNonceresponse parameter, which should be used as the value of theDPoP-NonceHTTP header.- Parameters:
required-trueto have the/auth/gmAPI 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)
-
-