/** * 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(); }
initClientRequest(); if (request.getAuthenticationMethod() == AuthenticationMethod.CLIENT_SECRET_BASIC && request.hasCredentials()) { clientRequest.setHttpMethod(getHttpMethod()); if (StringUtils.isNotBlank(getRequest().getToken())) { clientRequest.formParameter(TokenRevocationRequestParam.TOKEN, getRequest().getToken()); if (getRequest().getTokenTypeHint() != null) { clientRequest.formParameter(TokenRevocationRequestParam.TOKEN_TYPE_HINT, getRequest().getTokenTypeHint()); setResponse(tokenResponse); } catch (Exception e) { LOG.error(e.getMessage(), e); } finally { closeConnection(); return getResponse();
/** * 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. * @return The token revocation response. */ public TokenRevocationResponse execTokenRevocation(String clientId, String clientSecret, String token) { return execTokenRevocation(clientId, clientSecret, token, null); }
tokenRevocationRequest.setAuthPassword("INVALID_CLIENT_SECRET"); TokenRevocationClient tokenRevocationClient = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient.setRequest(tokenRevocationRequest); TokenRevocationResponse tokenRevocationResponse = tokenRevocationClient.exec();
tokenRevocationRequest.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient.setRequest(tokenRevocationRequest); TokenRevocationResponse tokenRevocationResponse = tokenRevocationClient.exec();
tokenRevocationRequest.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient.setRequest(tokenRevocationRequest); TokenRevocationResponse tokenRevocationResponse = tokenRevocationClient.exec();
tokenRevocationRequest1.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient1 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient1.setRequest(tokenRevocationRequest1); TokenRevocationResponse tokenRevocationResponse1 = tokenRevocationClient1.exec(); tokenRevocationRequest2.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient2 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient2.setRequest(tokenRevocationRequest2); TokenRevocationResponse tokenRevocationResponse2 = tokenRevocationClient2.exec();
tokenRevocationRequest1.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient1 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient1.setRequest(tokenRevocationRequest1); TokenRevocationResponse tokenRevocationResponse1 = tokenRevocationClient1.exec(); tokenRevocationRequest2.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient2 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient2.setRequest(tokenRevocationRequest2); TokenRevocationResponse tokenRevocationResponse2 = tokenRevocationClient2.exec();
tokenRevocationRequest1.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient1 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient1.setRequest(tokenRevocationRequest1); TokenRevocationResponse tokenRevocationResponse1 = tokenRevocationClient1.exec(); tokenRevocationRequest2.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient2 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient2.setRequest(tokenRevocationRequest2); TokenRevocationResponse tokenRevocationResponse2 = tokenRevocationClient2.exec();
tokenRevocationRequest2.setAuthPassword(clientSecret); TokenRevocationClient tokenRevocationClient2 = new TokenRevocationClient(tokenRevocationEndpoint); tokenRevocationClient2.setRequest(tokenRevocationRequest2); TokenRevocationResponse tokenRevocationResponse2 = tokenRevocationClient2.exec();