@PathVariable String provider,
WebRequest request,
@RequestParam(required = false) String scope,
HttpServletRequest httpRequest){
final StringBuilder url = new StringBuilder();
final SocialProvider providerEnum = SocialProvider.getProvider(provider);
log.debug("PROVIDER "+providerEnum);
if (providerEnum == null) {
url.append("404");
} else {
if (SocialProvider.GOOGLE_BUZZ.equals(providerEnum)) {
OAuth2Parameters auth2Parameters = new OAuth2Parameters(
EnMePlaceHolderConfigurer.getProperty("google.register.client.id"),
EnMePlaceHolderConfigurer.getProperty("google.register.client.secret"),
EnMePlaceHolderConfigurer.getProperty("google.accesToken"),
EnMePlaceHolderConfigurer.getProperty("google.authorizeURl"),
SocialProvider.GOOGLE_BUZZ,
EnMePlaceHolderConfigurer.getProperty("google.register.client.id"));
auth2RequestProvider = new OAuth2RequestFlow(auth2Parameters);
auth2RequestProvider.DEFAULT_CALLBACK_PATH = POST_REGISTER_REDIRECT;
url.append(auth2RequestProvider.buildOAuth2AuthorizeUrl(
EnMePlaceHolderConfigurer.getProperty("google.buzz.scope"), httpRequest, false));
url.append("&state=");
url.append(providerEnum.toString());
} else if (SocialProvider.FACEBOOK.equals(providerEnum)) {
OAuth2Parameters auth2Parameters = new OAuth2Parameters(
EnMePlaceHolderConfigurer.getProperty("facebook.api.key"),
EnMePlaceHolderConfigurer.getProperty("facebook.api.secret"),
EnMePlaceHolderConfigurer.getProperty("facebook.oauth.accesToken"),