logger.debug("token : {}", token);
logger.debug("verifier : {}", verifier);
if (tokenRequest == null) {
final String message = "Token request expired";
logger.error(message);
throw new OAuthCredentialsException(message);
}
final String savedToken = tokenRequest.getToken();
logger.debug("savedToken : {}", savedToken);
if (savedToken == null || !savedToken.equals(token)) {
final String message = "Token received : " + token + " is different from saved token : " + savedToken;
logger.error(message);
throw new OAuthCredentialsException(message);
}
final Verifier clientVerifier = new Verifier(verifier);
final Token accessToken = this.service.getAccessToken(tokenRequest, clientVerifier);
logger.debug("accessToken : {}", accessToken);
return accessToken;