cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: Minor update to the client reg service
Date Mon, 16 Nov 2015 14:47:04 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master e15c2661a -> a92b6ed79


Minor update to the client reg service


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/a92b6ed7
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/a92b6ed7
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/a92b6ed7

Branch: refs/heads/master
Commit: a92b6ed798348e1dee34b174f62d6a4c84ca8336
Parents: e15c266
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Nov 16 14:46:50 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Nov 16 14:46:50 2015 +0000

----------------------------------------------------------------------
 .../cxf/fediz/service/oidc/ClientRegistrationService.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/a92b6ed7/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
index 983845d..4fdf7a2 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
@@ -35,6 +35,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.SecurityContext;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.rs.security.oauth2.client.Consumer;
 import org.apache.cxf.rs.security.oauth2.client.Consumers;
@@ -72,7 +73,9 @@ public class ClientRegistrationService {
         
         Client newClient = new Client(clientId, clientSecret, isConfidential, appName, null);
         newClient.setApplicationDescription(appDesc);
-        newClient.setRedirectUris(Collections.singletonList(redirectURI));
+        if (!StringUtils.isEmpty(redirectURI)) {
+            newClient.setRedirectUris(Collections.singletonList(redirectURI));
+        }
         
         return registerNewClient(newClient);
     }


Mime
View raw message