/** * Executes the call to the REST Service requesting the token revocation and processes the response. * * @param clientId The client identifier. * @param clientSecret The client secret. * @param token The token that the client wants to get revoked. * @param tokenTypeHint A hint about the type of the token submitted for revocation. * @return The token revocation response. */ public TokenRevocationResponse execTokenRevocation(String clientId, String clientSecret, String token, TokenTypeHint tokenTypeHint) { setRequest(new TokenRevocationRequest()); getRequest().setToken(token); getRequest().setTokenTypeHint(tokenTypeHint); getRequest().setAuthUsername(clientId); getRequest().setAuthPassword(clientSecret); return exec(); }
TokenRevocationRequest tokenRevocationRequest = new TokenRevocationRequest(); tokenRevocationRequest.setToken("INVALID_ACCESS_TOKEN"); tokenRevocationRequest.setTokenTypeHint(TokenTypeHint.ACCESS_TOKEN);
TokenRevocationRequest tokenRevocationRequest = new TokenRevocationRequest(); tokenRevocationRequest.setToken(refreshToken); tokenRevocationRequest.setTokenTypeHint(TokenTypeHint.REFRESH_TOKEN);
TokenRevocationRequest tokenRevocationRequest = new TokenRevocationRequest(); tokenRevocationRequest.setToken(null); tokenRevocationRequest.setAuthUsername(clientId);
TokenRevocationRequest tokenRevocationRequest2 = new TokenRevocationRequest(); tokenRevocationRequest2.setToken(accessToken); tokenRevocationRequest2.setTokenTypeHint(TokenTypeHint.ACCESS_TOKEN);
TokenRevocationRequest tokenRevocationRequest1 = new TokenRevocationRequest(); tokenRevocationRequest1.setToken(refreshToken2); tokenRevocationRequest1.setAuthUsername(clientId); TokenRevocationRequest tokenRevocationRequest2 = new TokenRevocationRequest(); tokenRevocationRequest2.setToken(accessToken); tokenRevocationRequest2.setAuthUsername(clientId);
TokenRevocationRequest tokenRevocationRequest1 = new TokenRevocationRequest(); tokenRevocationRequest1.setToken(refreshToken2); tokenRevocationRequest1.setTokenTypeHint(TokenTypeHint.REFRESH_TOKEN); TokenRevocationRequest tokenRevocationRequest2 = new TokenRevocationRequest(); tokenRevocationRequest2.setToken(accessToken2); tokenRevocationRequest2.setTokenTypeHint(TokenTypeHint.ACCESS_TOKEN);
TokenRevocationRequest tokenRevocationRequest1 = new TokenRevocationRequest(); tokenRevocationRequest1.setToken(refreshToken); tokenRevocationRequest1.setTokenTypeHint(TokenTypeHint.REFRESH_TOKEN); TokenRevocationRequest tokenRevocationRequest2 = new TokenRevocationRequest(); tokenRevocationRequest2.setToken(accessToken); tokenRevocationRequest2.setTokenTypeHint(TokenTypeHint.ACCESS_TOKEN);