From: David Paleino <dapal@debian.org>
Subject: port JOSM code to OAuth-Signpost 1.2
---
src/org/openstreetmap/josm/data/oauth/OAuthParameters.java | 6 +++---
src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
|
old
|
new
|
import oauth.signpost.OAuthConsumer;
|
| 5 | 5 | import oauth.signpost.OAuthProvider; |
| 6 | 6 | import oauth.signpost.basic.DefaultOAuthConsumer; |
| 7 | 7 | import oauth.signpost.basic.DefaultOAuthProvider; |
| 8 | | import oauth.signpost.signature.SignatureMethod; |
| | 8 | import oauth.signpost.signature.HmacSha1MessageSigner; |
| 9 | 9 | |
| 10 | 10 | import org.openstreetmap.josm.data.Preferences; |
| 11 | 11 | import org.openstreetmap.josm.tools.CheckParameterUtil; |
| … |
… |
public class OAuthParameters {
|
| 133 | 133 | * @return the consumer |
| 134 | 134 | */ |
| 135 | 135 | public OAuthConsumer buildConsumer() { |
| 136 | | return new DefaultOAuthConsumer(consumerKey, consumerSecret, SignatureMethod.HMAC_SHA1); |
| | 136 | OAuthConsumer consumer = new DefaultOAuthConsumer(consumerKey, consumerSecret); |
| | 137 | return consumer; |
| 137 | 138 | } |
| 138 | 139 | |
| 139 | 140 | /** |
| … |
… |
public class OAuthParameters {
|
| 146 | 147 | public OAuthProvider buildProvider(OAuthConsumer consumer) throws IllegalArgumentException { |
| 147 | 148 | CheckParameterUtil.ensureParameterNotNull(consumer, "consumer"); |
| 148 | 149 | return new DefaultOAuthProvider( |
| 149 | | consumer, |
| 150 | 150 | requestTokenUrl, |
| 151 | 151 | accessTokenUrl, |
| 152 | 152 | authoriseUrl |