cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: [CXF-7003] - Allow STS Tokens to have an optional ID
Date Tue, 09 Aug 2016 09:57:29 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 81a7a670b -> c721accef


[CXF-7003] - Allow STS Tokens to have an optional ID


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

Branch: refs/heads/3.1.x-fixes
Commit: c721accef06c5db698413e31c2efff01f8bb038f
Parents: 81a7a67
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Aug 9 10:48:50 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Aug 9 10:49:27 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c721acce/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
index 0b6f619..8d1c28e 100755
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
@@ -1456,7 +1456,8 @@ public abstract class AbstractSTSClient implements Configurable, InterceptorProv
         Element rstDec = rst;
         String id = findID(rar, rur, rstDec);
         if (StringUtils.isEmpty(id)) {
-            throw new TrustException("NO_ID", LOG);
+            LOG.fine("No ID extracted from token, so just making one up");
+            id = WSSConfig.getNewInstance().getIdAllocator().createSecureId("_", null);
         }
         SecurityToken token = new SecurityToken(id, rstDec, lte);
         token.setAttachedReference(rar);


Mime
View raw message