Skip to content

Commit 03dd1ea

Browse files
committed
OAuth1.0: send "oob" instead of null callback while requesting RequestToken (thanks to https://github.com/Rafaelsk)
1 parent aec9947 commit 03dd1ea

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* add new API - Automatic (https://www.automatic.com/) (thanks to https://github.com/ramsrib)
55
* add new API - Fitbit (https://www.fitbit.com/) (thanks to https://github.com/JustinLawler and https://github.com/alexthered)
66
* deprecate OAuthConfig
7+
* OAuth1.0: send "oob" instead of null callback while requesting RequestToken (thanks to https://github.com/Rafaelsk)
78

89
[5.3.0]
910
* fix Salesforce API (thanks to https://github.com/jhorowitz-firedrum)

scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth10aService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ public OAuth1RequestToken convert(Response response) throws IOException {
7878

7979
protected OAuthRequest prepareRequestTokenRequest() {
8080
final OAuthRequest request = new OAuthRequest(api.getRequestTokenVerb(), api.getRequestTokenEndpoint());
81-
final String callback = getCallback();
81+
String callback = getCallback();
82+
if (callback == null) {
83+
callback = OAuthConstants.OOB;
84+
}
8285
log("setting oauth_callback to " + callback);
8386
request.addOAuthParameter(OAuthConstants.CALLBACK, callback);
8487
addOAuthParams(request, "");

0 commit comments

Comments
 (0)