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
Constructors Constructor Description TokenRevocationClient(java.lang.String url)
Constructs a token revocation client by providing a REST url where the token service is located.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRevocationResponse
exec()
Executes the call to the REST Service and processes the response.TokenRevocationResponse
execTokenRevocation(java.lang.String clientId, java.lang.String clientSecret, java.lang.String token)
Executes the call to the REST Service requesting the token revocation and processes the response.TokenRevocationResponse
execTokenRevocation(java.lang.String clientId, java.lang.String clientSecret, java.lang.String token, io.jans.as.model.common.TokenTypeHint tokenTypeHint)
Executes the call to the REST Service requesting the token revocation and processes the response.java.lang.String
getHttpMethod()
-
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
-
-
-
-
Method Detail
-
getHttpMethod
public java.lang.String getHttpMethod()
- Specified by:
getHttpMethod
in classBaseClient<TokenRevocationRequest,TokenRevocationResponse>
-
execTokenRevocation
public TokenRevocationResponse execTokenRevocation(java.lang.String clientId, java.lang.String clientSecret, java.lang.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(java.lang.String clientId, java.lang.String clientSecret, java.lang.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
public TokenRevocationResponse exec()
Executes the call to the REST Service and processes the response.- Returns:
- The token revocation response.
-
-