cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1523582 - in /cxf/fediz/trunk/services: idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java
Date Mon, 16 Sep 2013 10:43:37 GMT
Author: coheigea
Date: Mon Sep 16 10:43:37 2013
New Revision: 1523582

URL: http://svn.apache.org/r1523582
Log:
[FEDIZ-4] - Re-enabling support for HolderOfKey in the IdP

Modified:
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
    cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java?rev=1523582&r1=1523581&r2=1523582&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
Mon Sep 16 10:43:37 2013
@@ -22,8 +22,10 @@ import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.security.cert.X509Certificate;
 import java.util.List;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLStreamException;
@@ -31,7 +33,6 @@ import javax.xml.stream.XMLStreamExcepti
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
-
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -67,10 +68,10 @@ public class STSClientAction {
 
     private static final String HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER = 
             "http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer";
-/*    
+    
     private static final String HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_PUBLICKEY
= 
             "http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey";
-*/
+
     private static final String HTTP_WWW_W3_ORG_2005_08_ADDRESSING = "http://www.w3.org/2005/08/addressing";
 
     private static final String HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512 = 
@@ -93,7 +94,7 @@ public class STSClientAction {
     
     private boolean isPortSet;
     
-    //private String keyType = HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_PUBLICKEY;
+    private String keyType = HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER;
 
     public String getWsdlLocation() {
         return wsdlLocation;
@@ -180,10 +181,7 @@ public class STSClientAction {
             LOG.debug("TokenType " + sts.getTokenType() + " set for " + wtrealm);
         }
         
-        sts.setKeyType(HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER);
-        
-        //[TODO] What is the purpose of the keytype?
-        /*
+        sts.setKeyType(keyType);
         if (HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_PUBLICKEY.equals(keyType)) {
             HttpServletRequest servletRequest = WebUtils.getHttpServletRequest(context);
             if (servletRequest != null) {
@@ -198,7 +196,6 @@ public class STSClientAction {
                 }
             }
         }
-        */
 
         processWsdlLocation(context);
         sts.setWsdlLocation(wsdlLocation);
@@ -349,4 +346,12 @@ public class STSClientAction {
         this.isPortSet = true;
     }
 
+    public String getKeyType() {
+        return keyType;
+    }
+
+    public void setKeyType(String keyType) {
+        this.keyType = keyType;
+    }
+
 }

Modified: cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java?rev=1523582&r1=1523581&r2=1523582&view=diff
==============================================================================
--- cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java
(original)
+++ cxf/fediz/trunk/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FedizSAMLDelegationHandler.java
Mon Sep 16 10:43:37 2013
@@ -37,12 +37,10 @@ public class FedizSAMLDelegationHandler 
     
     @Override
     public boolean canHandleToken(ReceivedToken delegateTarget) {
-        System.out.println("CANHANDLE");
         return super.canHandleToken(delegateTarget);
     }
     @Override
     public TokenDelegationResponse isDelegationAllowed(TokenDelegationParameters tokenParameters)
{ 
-        System.out.println("HERE!");
         return super.isDelegationAllowed(tokenParameters);
     }
     @Override
@@ -50,4 +48,4 @@ public class FedizSAMLDelegationHandler 
         return Collections.emptyList();
     }
     
-}
\ No newline at end of file
+}



Mime
View raw message