[DebianGIS-dev] [SCM] josm branch, master, updated. debian/0.0.svn3208-1-19-g14aac9f

David Paleino dapal at debian.org
Thu Jul 15 12:29:57 UTC 2010


The following commit has been merged in the master branch:
commit 14aac9f98548d85385be21c08bdca6d1fcb316ab
Author: David Paleino <dapal at debian.org>
Date:   Thu Jul 15 14:27:26 2010 +0200

    debian/patches/60-port_oauth_1.2.patch added: port josm to signpost 1.2

diff --git a/debian/changelog b/debian/changelog
index a22d533..dd1fea3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,10 +6,11 @@ josm (0.0.svn3329-2) UNRELEASED; urgency=low
     - debian/patches/:
       - series: 60-disable_oauth.patch disabled
       - 10-build.patch: add signpost-core.jar to MANIFEST's Class-Path
+      - 60-port_oauth_1.2.patch added: port josm to signpost 1.2
   * debian/README.Debian deleted, josm is a wrapper that uses the
     alternatives system
 
- -- David Paleino <dapal at debian.org>  Thu, 15 Jul 2010 14:18:52 +0200
+ -- David Paleino <dapal at debian.org>  Thu, 15 Jul 2010 14:19:44 +0200
 
 josm (0.0.svn3329-1) unstable; urgency=low
 
diff --git a/debian/patches/60-port_oauth_1.2.patch b/debian/patches/60-port_oauth_1.2.patch
new file mode 100644
index 0000000..c794616
--- /dev/null
+++ b/debian/patches/60-port_oauth_1.2.patch
@@ -0,0 +1,58 @@
+From: David Paleino <dapal at debian.org>
+Subject: port JOSM code to OAuth-Signpost 1.2
+Forwarded: https://josm.openstreetmap.de/ticket/5244
+
+---
+ 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(-)
+
+--- josm.orig/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java
++++ josm/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java
+@@ -5,7 +5,7 @@ import oauth.signpost.OAuthConsumer;
+ import oauth.signpost.OAuthProvider;
+ import oauth.signpost.basic.DefaultOAuthConsumer;
+ import oauth.signpost.basic.DefaultOAuthProvider;
+-import oauth.signpost.signature.SignatureMethod;
++import oauth.signpost.signature.HmacSha1MessageSigner;
+ 
+ import org.openstreetmap.josm.data.Preferences;
+ import org.openstreetmap.josm.tools.CheckParameterUtil;
+@@ -133,7 +133,8 @@ public class OAuthParameters {
+      * @return the consumer
+      */
+     public OAuthConsumer buildConsumer() {
+-        return new DefaultOAuthConsumer(consumerKey, consumerSecret, SignatureMethod.HMAC_SHA1);
++        OAuthConsumer consumer = new DefaultOAuthConsumer(consumerKey, consumerSecret);
++        return consumer;
+     }
+ 
+     /**
+@@ -146,7 +147,6 @@ public class OAuthParameters {
+     public OAuthProvider buildProvider(OAuthConsumer consumer) throws IllegalArgumentException {
+         CheckParameterUtil.ensureParameterNotNull(consumer, "consumer");
+         return new DefaultOAuthProvider(
+-                consumer,
+                 requestTokenUrl,
+                 accessTokenUrl,
+                 authoriseUrl
+--- josm.orig/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
++++ josm/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
+@@ -129,7 +129,7 @@ public class OsmOAuthAuthorizationClient
+         try {
+             monitor.beginTask("");
+             monitor.indeterminateSubTask(tr("Retrieving OAuth Request Token from ''{0}''", oauthProviderParameters.getRequestTokenUrl()));
+-            provider.retrieveRequestToken(null);
++            provider.retrieveRequestToken(consumer, null);
+             return OAuthToken.createToken(consumer);
+         } catch(OAuthCommunicationException e){
+             if (canceled)
+@@ -162,7 +162,7 @@ public class OsmOAuthAuthorizationClient
+         try {
+             monitor.beginTask("");
+             monitor.indeterminateSubTask(tr("Retrieving OAuth Access Token from ''{0}''", oauthProviderParameters.getAccessTokenUrl()));
+-            provider.retrieveAccessToken(null);
++            provider.retrieveAccessToken(consumer, null);
+             return OAuthToken.createToken(consumer);
+         } catch(OAuthCommunicationException e){
+             if (canceled)

-- 
Java OpenStreetMap editor



More information about the Pkg-grass-devel mailing list