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: Delaying the audience check until the audience is split on spaces as multiple audiences are supported
Date Fri, 22 Jan 2016 17:14:17 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 14978697c -> 6fd6e6145


Delaying the audience check until the audience is split on spaces as multiple audiences are
supported


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

Branch: refs/heads/master
Commit: 6fd6e6145c0d0432f9e8fa4359794f82d198065e
Parents: 1497869
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jan 22 17:14:03 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jan 22 17:14:03 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/6fd6e614/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 9f8bf76..026d9ed 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
@@ -210,9 +210,6 @@ public class ClientRegistrationService {
         if (redirectURI != null && !"".equals(redirectURI) && !isValidURI(redirectURI,
false)) {
             throw new InvalidRegistrationException("An invalid redirect URI was specified:
" + redirectURI);
         }
-        if (audience != null && !"".equals(audience) && !isValidURI(audience,
true)) {
-            throw new InvalidRegistrationException("An invalid audience URI was specified:
" + audience);
-        }
         
         String clientId = generateClientId();
         boolean isConfidential = "confidential".equals(appType);
@@ -240,8 +237,10 @@ public class ClientRegistrationService {
             List<String> registeredAuds = new LinkedList<String>();
             for (String aud : auds) {
                 // make sure it is a proper URI
-                String theAud = URI.create(aud.trim()).toString();
-                registeredAuds.add(theAud);
+                if (audience != null && !"".equals(audience) && !isValidURI(audience,
true)) {
+                    throw new InvalidRegistrationException("An invalid audience URI was specified:
" + audience);
+                }
+                registeredAuds.add(aud);
             }
             if (!registeredAuds.isEmpty()) {
                 newClient.setRegisteredAudiences(registeredAuds);


Mime
View raw message