Author: owulff
Date: Fri May 18 09:57:24 2012
New Revision: 1340054

URL: http://svn.apache.org/viewvc?rev=1340054&view=rev
Log:
[FEDIZ-11] Support for WS-Trust Namespace 2005/02

Modified:
    
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
    
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java

Modified: 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
URL: 
http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java?rev=1340054&r1=1340053&r2=1340054&view=diff
==============================================================================
--- 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
 (original)
+++ 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationConstants.java
 Fri May 18 09:57:24 2012
@@ -207,6 +207,11 @@ public final class FederationConstants {
     public static final URI AUTH_TYPE_SMARTCARD = URI
         
.create("http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/smartcard";);
 
+    public static final String WS_TRUST_13_NS = 
"http://docs.oasis-open.org/ws-sx/ws-trust/200512";;
+    
+    public static final String WS_TRUST_2005_02_NS = 
"http://schemas.xmlsoap.org/ws/2005/02/trust";;
+    
+    
     private FederationConstants() {
         
     }

Modified: 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
URL: 
http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java?rev=1340054&r1=1340053&r2=1340054&view=diff
==============================================================================
--- 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
 (original)
+++ 
cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
 Fri May 18 09:57:24 2012
@@ -49,8 +49,6 @@ public class FederationProcessorImpl imp
 
     private static final Logger LOG = 
LoggerFactory.getLogger(FederationProcessorImpl.class);
 
-    private String namespace = 
"http://docs.oasis-open.org/ws-sx/ws-trust/200512";;
-
     private TokenReplayCache<String> replayCache;
 
     /**
@@ -118,7 +116,8 @@ public class FederationProcessorImpl imp
 
         while (el != null) {
             String ln = el.getLocalName();
-            if (namespace.equals(el.getNamespaceURI())) {
+            if 
(FederationConstants.WS_TRUST_13_NS.equals(el.getNamespaceURI()) 
+                || 
FederationConstants.WS_TRUST_2005_02_NS.equals(el.getNamespaceURI())) {
                 if ("Lifetime".equals(ln)) {
                     lifetimeElem = el;
                 } else if ("RequestedSecurityToken".equals(ln)) {
@@ -136,7 +135,10 @@ public class FederationProcessorImpl imp
                             : "null"));
             LOG.debug("Tokentype: " + ((tt != null) ? tt.toString() : "null"));
         }
-
+        if (rst == null) {
+            LOG.info("RST is null");
+            throw new RuntimeException("RST is null");
+        }
         LifeTime lifeTime = null;
         if (lifetimeElem != null) {
             lifeTime = processLifeTime(lifetimeElem);


Reply via email to