}
}
public OAuth2TokenValidationResponseDTO validateAuthenticationRequest(String accessToken) throws Exception{
OAuth2TokenValidationRequestDTO oauthReq = new OAuth2TokenValidationRequestDTO();
oauthReq.setAccessToken(accessToken);
oauthReq.setTokenType(OAuthConstants.BEARER_TOKEN_TYPE);
try {
return stub.validate(oauthReq);
} catch (RemoteException e) {
log.error("Error while validating OAuth2 request");
throw new Exception("Error while validating OAuth2 request", e);