Class RevocationRequest
- java.lang.Object
-
- com.authlete.common.dto.RevocationRequest
-
- All Implemented Interfaces:
Serializable
public class RevocationRequest extends Object implements Serializable
Request to Authlete's/auth/revocationAPI.parameters(REQUIRED)-
OAuth 2.0 token revocation request parameters which are the request parameters that the OAuth 2.0 token revocation endpoint (RFC 7009) of the service 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 revocation request from the client application.If the token revocation endpoint of the service implementation supports Basic Authentication as a means of client authentication, and if 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 revocation request from the client application.If the token revocation endpoint of the service implementation supports Basic Authentication as a means of client authentication, and if 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 certification used in the TLS connection between the client application and the revocation endpoint.
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.
The entity body of a token revocation request may contain the client ID (
client_id) and the client secret (client_secret) along with other request parameters as described in RFC 6749, 2.3.1. Client Password. If the client credentials are contained in bothAuthorizationheader and the entity body, they must be identical. Otherwise, Authlete's/auth/revocationAPI generates an error (it's not a service error but a client error).When the presented token is an access token, the implementation revokes the access token and its associated refresh token, too. Likewise, if the presented token is a refresh token, the implementation revokes the refresh token and its associated access token. Note that, however, other access tokens and refresh tokens are not revoked even though their associated client application, subject and grant type are equal to those of the token to be revoked.
- Since:
- 1.16
- Author:
- Takahiko Kawasaki
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RevocationRequest()
-
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 revocation endpoint.String[]getClientCertificatePath()Get the client certificate path presented by the client during client authentication.StringgetClientId()Get the client ID extracted fromAuthorizationheader of the token revocation request from the client application.StringgetClientSecret()Get the client secret extracted fromAuthorizationheader of the token revocation 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 OAuth 2.0 token revocation endpoint of the service implementation received from the client application.RevocationRequestsetClientCertificate(String certificate)Set the client certificate used in the TLS connection between the client application and the revocation endpoint.RevocationRequestsetClientCertificatePath(String[] path)Set the client certificate path presented by the client during client authentication.RevocationRequestsetClientId(String clientId)Set the client ID extracted fromAuthorizationheader of the token revocation request from the client application.RevocationRequestsetClientSecret(String clientSecret)Set the client secret extracted fromAuthorizationheader of the token revocation request from the client application.RevocationRequestsetOauthClientAttestation(String jwt)Set the value of theOAuth-Client-AttestationHTTP header.RevocationRequestsetOauthClientAttestationPop(String jwt)Set the value of theOAuth-Client-Attestation-PoPHTTP header.RevocationRequestsetParameters(String parameters)Set the value ofparameterswhich are the request parameters that the OAuth 2.0 token revocation endpoint of the service implementation received from the client application.RevocationRequestsetParameters(Map<String,String[]> parameters)Set the value ofparameterswhich are the request parameters that the OAuth 2.0 token revocation endpoint of the service implementation received from the client application.
-
-
-
Method Detail
-
getParameters
public String getParameters()
Get the value ofparameterswhich are the request parameters that the OAuth 2.0 token revocation endpoint of the service implementation received from the client application.
-
setParameters
public RevocationRequest setParameters(String parameters)
Set the value ofparameterswhich are the request parameters that the OAuth 2.0 token revocation endpoint of the service implementation received from the client application.
-
setParameters
public RevocationRequest setParameters(Map<String,String[]> parameters)
Set the value ofparameterswhich are the request parameters that the OAuth 2.0 token revocation endpoint of the service implementation received from the client application.This method converts the given map into a string in
x-www-form-urlencodedand passes it tosetParameters(String)method.- Parameters:
parameters- Request parameters.- Returns:
thisobject.- Since:
- 1.24
-
getClientId
public String getClientId()
Get the client ID extracted fromAuthorizationheader of the token revocation request from the client application.
-
setClientId
public RevocationRequest setClientId(String clientId)
Set the client ID extracted fromAuthorizationheader of the token revocation request from the client application.
-
getClientSecret
public String getClientSecret()
Get the client secret extracted fromAuthorizationheader of the token revocation request from the client application.
-
setClientSecret
public RevocationRequest setClientSecret(String clientSecret)
Set the client secret extracted fromAuthorizationheader of the token revocation request from the client application.
-
getClientCertificate
public String getClientCertificate()
Get the client certificate used in the TLS connection between the client application and the revocation endpoint.- Returns:
- The client certificate.
- Since:
- 2.88
-
setClientCertificate
public RevocationRequest setClientCertificate(String certificate)
Set the client certificate used in the TLS connection between the client application and the revocation endpoint.- Parameters:
certificate- The client certificate.- Returns:
thisobject.- Since:
- 2.88
-
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.
- Since:
- 2.88
-
setClientCertificatePath
public RevocationRequest setClientCertificatePath(String[] path)
Set the client certificate path presented by the client during client authentication.- Parameters:
path- The client certificate path. Each element is a string in PEM format.- Returns:
thisobject.- Since:
- 2.88
-
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 RevocationRequest 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 RevocationRequest 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
-
-