UglyTroLL/Douban-Java-SDK-OAuth2

redirect_url setting is wrong in OAuthDoubanProvider.java

Opened this issue · 3 comments

Hi:
I'm using the java-dk recently to find that the redirectUrl doesn't take effect when it comes to OAuthDoubanProvider.tradeAccessTokenWithCode(),after debuging i find that something wrong with this line:

OAuthDoubanProvider.java

params.put("redirect_uri", DefaultConfigs.ACCESS_TOKEN_REDIRECT_URL);

after change it to :

params.put("redirect_uri", this.redirectUrl);

everything is fine.

Is this a bug or sth? Well it did confuse me for a while ....
thanks.

Yes it is a bug, could you issue a pull request with your fix? I will merge it into the code base.

ok, i've already commit a pull request in your project,thanks.

Thanks!
Minor tweaks might be needed there, I've commented on your PR, please take a look and let me know if you have any questions.