Add authentication to OAuth2ServiceImpl (#317) #320

Closed
wants to merge 1 commit into
from

2 participants

@dsyer

The proposed solution overloads the SignatureType enum
(used in OAuth1) as an indicator of authentication type.
This is stretching the terminology a bit, but the OAuth2
support in Scribe does this in other places (like using
Verifier to mean AuthorizationCode), so I assume it's
roughly withing acceptable bounds.

@dsyer dsyer Add authentication to OAuth2ServiceImpl (#317)
The proposed solution overloads the SignatureType enum
(used in OAuth1) as an indicator of authentication type.
This is stretching the terminology a bit, but the OAuth2
support in Scribe does this in other places (like using
Verifier to mean AuthorizationCode), so I assume it's
roughly withing acceptable bounds.
510e0df
@fernandezpablo85 fernandezpablo85 commented on the diff Oct 23, 2012
src/main/java/org/scribe/oauth/OAuth20ServiceImpl.java
@@ -69,4 +76,33 @@ public String getAuthorizationUrl(Token requestToken)
return api.getAuthorizationUrl(config);
}
+ private void appendAuthentication(OAuthRequest request)
@fernandezpablo85
fernandezpablo85 added a line comment Oct 23, 2012

This led me to think... perhaps we want an appendAuthentication(request) on the SignatureType enum? We'll have to pass the logger in which is messy... thoughts?

@dsyer
dsyer added a line comment Oct 24, 2012

I see the case for encapsulation. But since we are overloading SignatureType as an OAuth signature and an OAuth2 authentication we would have to add more behaviour to cover both cases and probably we don't want to clutter it with too much stuff. So on balance I prefer to keep it as a low level simple data holder, but it's your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment