Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #141 from adamss/master
Browse files Browse the repository at this point in the history
Fixed issue with scope setup for OAuth2 services
  • Loading branch information
habuma committed Aug 21, 2014
2 parents 15dcfc0 + efc82e1 commit 8ecd425
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -50,7 +50,9 @@ private <A> SocialAuthenticationService<A> wrapAsSocialAuthenticationService(Con
if (cf instanceof OAuth1ConnectionFactory) {
return new OAuth1AuthenticationService<A>((OAuth1ConnectionFactory<A>) cf);
} else if (cf instanceof OAuth2ConnectionFactory) {
return new OAuth2AuthenticationService<A>((OAuth2ConnectionFactory<A>) cf);
final OAuth2AuthenticationService<A> authService = new OAuth2AuthenticationService<A>((OAuth2ConnectionFactory<A>) cf);
authService.setDefaultScope(((OAuth2ConnectionFactory<A>) cf).getScope());
return authService;
}
throw new IllegalArgumentException("The connection factory must be one of OAuth1ConnectionFactory or OAuth2ConnectionFactory");
}
Expand Down

0 comments on commit 8ecd425

Please sign in to comment.