Package io.jans.as.client
Class TokenRevocationClient
java.lang.Object
io.jans.as.client.BaseClient<TokenRevocationRequest,TokenRevocationResponse>
io.jans.as.client.TokenRevocationClient
public class TokenRevocationClient
extends BaseClient<TokenRevocationRequest,TokenRevocationResponse>
Encapsulates functionality to make token revocation request calls to an authorization server via REST Services.
- Version:
- January 16, 2019
- Author:
- Javier Rojas Blum
-
Field Summary
Fields inherited from class io.jans.as.client.BaseClient
clientResponse, executor, request, requestForm, response, resteasyClient, webTarget
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a token revocation client by providing a REST url where the token service is located. -
Method Summary
Modifier and TypeMethodDescriptionexec()
Executes the call to the REST Service and processes the response.execTokenRevocation
(String clientId, String clientSecret, String token) Executes the call to the REST Service requesting the token revocation and processes the response.execTokenRevocation
(String clientId, String clientSecret, String token, io.jans.as.model.common.TokenTypeHint tokenTypeHint) Executes the call to the REST Service requesting the token revocation and processes the response.Methods inherited from class io.jans.as.client.BaseClient
addReqParam, addReqParam, applyCookies, closeConnection, getCookies, getExecutor, getHeaders, getRequest, getRequestAsString, getResponse, getResponseAsString, getUrl, initClient, prepareAuthorizatedClientRequest, setExecutor, setRequest, setResponse, setUrl
-
Constructor Details
-
TokenRevocationClient
Constructs a token revocation client by providing a REST url where the token service is located.- Parameters:
url
- The REST Service location.
-
-
Method Details
-
getHttpMethod
- Specified by:
getHttpMethod
in classBaseClient<TokenRevocationRequest,
TokenRevocationResponse>
-
execTokenRevocation
public TokenRevocationResponse execTokenRevocation(String clientId, String clientSecret, String token) Executes the call to the REST Service requesting the token revocation and processes the response.- Parameters:
clientId
- The client identifier.clientSecret
- The client secret.token
- The token that the client wants to get revoked.- Returns:
- The token revocation response.
-
execTokenRevocation
public TokenRevocationResponse execTokenRevocation(String clientId, String clientSecret, String token, io.jans.as.model.common.TokenTypeHint tokenTypeHint) Executes the call to the REST Service requesting the token revocation and processes the response.- Parameters:
clientId
- The client identifier.clientSecret
- The client secret.token
- The token that the client wants to get revoked.tokenTypeHint
- A hint about the type of the token submitted for revocation.- Returns:
- The token revocation response.
-
exec
Executes the call to the REST Service and processes the response.- Returns:
- The token revocation response.
-