String returnToUrl = buildReturnToUrl(request);
OAuthToken requestToken = ops.fetchRequestToken(returnToUrl, null);
request.getSession().setAttribute(OAUTH_TOKEN_ATTRIBUTE, requestToken);
// Redirect to the service provider for authorization
OAuth1Parameters params;
if (ops.getVersion() == OAuth1Version.CORE_10) {
params = new OAuth1Parameters();
params.setCallbackUrl(returnToUrl);
} else {
params = OAuth1Parameters.NONE;
}
throw new SocialAuthenticationRedirectException(ops.buildAuthenticateUrl(requestToken.getValue(), params));
} else {