Updated code to work with Scribe Java 4.0.0 and adjusted tests (all pass now).
Updated plugin version to 4.0.0 due to breaking changes:
All Scribe classes have been moved to new packages. This means most clients will have to change provider configuration. For example, org.scribe.builder.api.FacebookApi is now com.github.scribejava.apis.FacebookApi.
Some method signatures in OauthService.groovy have changed to take into account the differences between OAuth 1 and OAuth 2 in the new Scribe Java. Also, some of the dynamic methods now dispatch to one version or another based on the number of arguments received.
Clients that make use of Scribe Java directly might have to add the API dependency explicitly: compile 'com.github.scribejava:scribejava-apis:4.0.0'
The changes were made somewhat blindly, without a deep understanding of OAuth - the minimum to make the tests pass and enable login with Facebook and Google. Some parts of the code are questionable. For example, OAuth2 does not use a RequestToken now, yet the plugin expects to find a RequestToken in the session in both cases and uses EMPTY_TOKEN for OAuth 2. Since Token is abstract in the new library, the value of EMPTY_TOKEN has been changed to an OAuth2AccessToken, which makes no sense.
Updated code to work with Scribe Java 4.0.0 and adjusted tests (all pass now). Updated plugin version to 4.0.0 due to breaking changes:
org.scribe.builder.api.FacebookApi
is nowcom.github.scribejava.apis.FacebookApi
.compile 'com.github.scribejava:scribejava-apis:4.0.0'
The changes were made somewhat blindly, without a deep understanding of OAuth - the minimum to make the tests pass and enable login with Facebook and Google. Some parts of the code are questionable. For example, OAuth2 does not use a RequestToken now, yet the plugin expects to find a RequestToken in the session in both cases and uses
EMPTY_TOKEN
for OAuth 2. Since Token is abstract in the new library, the value ofEMPTY_TOKEN
has been changed to anOAuth2AccessToken
, which makes no sense.