cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1294357 - in /cxf/branches/2.5.x-fixes: ./ rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/ rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/
Date Mon, 27 Feb 2012 22:08:26 GMT
Author: sergeyb
Date: Mon Feb 27 22:08:26 2012
New Revision: 1294357

URL: http://svn.apache.org/viewvc?rev=1294357&view=rev
Log:
Merged revisions 1293448 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1293448 | sergeyb | 2012-02-24 21:55:26 +0000 (Fri, 24 Feb 2012) | 1 line
  
  Updating OAuth10 client to have both applicationURI and callback properties
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
    cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenHandler.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 27 22:08:26 2012
@@ -1 +1 @@
-/cxf/trunk:1291943,1292763,1292792,1292839,1293064,1293255,1293326,1293413,1293546,1294188
+/cxf/trunk:1291943,1292763,1292792,1292839,1293064,1293255,1293326,1293413,1293448,1293546,1294188

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java?rev=1294357&r1=1294356&r2=1294357&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
Mon Feb 27 22:08:26 2012
@@ -28,7 +28,7 @@ public class Client {
     private String applicationName;
     private String applicationDescription;
     private String logoUri;
-    
+    private String callbackURI;
     private String loginName;
         
     private AccessToken preAuthorizedToken;
@@ -178,4 +178,12 @@ public class Client {
     public AccessToken getPreAuthorizedToken() {
         return preAuthorizedToken;
     }
+
+    public void setCallbackURI(String callbackURI) {
+        this.callbackURI = callbackURI;
+    }
+
+    public String getCallbackURI() {
+        return callbackURI;
+    }
 }

Modified: cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenHandler.java?rev=1294357&r1=1294356&r2=1294357&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenHandler.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenHandler.java
Mon Feb 27 22:08:26 2012
@@ -120,8 +120,11 @@ public class RequestTokenHandler {
     protected void validateCallbackURL(Client client,
                                        String oauthCallback) throws OAuthProblemException
{
 
-        if (!StringUtils.isEmpty(client.getApplicationURI())
-                    && !oauthCallback.startsWith(client.getApplicationURI())) {
+        if (StringUtils.isEmpty(oauthCallback) 
+            || client.getCallbackURI() != null
+                && !oauthCallback.equals(client.getCallbackURI())
+            || client.getApplicationURI() != null
+                && !oauthCallback.startsWith(client.getApplicationURI())) {
             OAuthProblemException problemEx = new OAuthProblemException(
                 OAuth.Problems.PARAMETER_REJECTED + " - " + OAuth.OAUTH_CALLBACK);
             problemEx



Mime
View raw message