示例#1
0
  private Profile doVerifyResponse(final Map<String, String> requestParams) throws Exception {
    LOG.info("Retrieving Access Token in verify response function");
    if (requestParams.get("error_reason") != null
        && "user_denied".equals(requestParams.get("error_reason"))) {
      throw new UserDeniedPermissionException();
    }
    accessGrant = authenticationStrategy.verifyResponse(requestParams, MethodType.POST.toString());

    if (accessGrant != null) {
      LOG.debug("Obtaining user profile");
      return getProfile();
    } else {
      throw new SocialAuthException("Access token not found");
    }
  }