You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/11/08 14:56:34 UTC

[07/14] cxf-fediz git commit: Allow to define properties on STSClientAction to support other authentication styles against the STS (x509 for example)

Allow to define properties on STSClientAction to support other authentication styles against the STS (x509 for example)


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

Branch: refs/heads/1.3.x-fixes
Commit: fe5c61ab08de600faba385b05c3b4ffd3109947f
Parents: b0774d6
Author: Jan Bernhardt <jb...@talend.com>
Authored: Thu Aug 4 16:16:07 2016 +0200
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Nov 8 14:43:48 2016 +0000

----------------------------------------------------------------------
 .../fediz/service/idp/beans/STSClientAction.java    | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/fe5c61ab/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
index dbfbed2..dbe4a25 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
@@ -24,6 +24,7 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.cert.X509Certificate;
 import java.util.List;
+import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.xml.namespace.QName;
@@ -92,6 +93,8 @@ public class STSClientAction {
   
     protected String tokenType = WSConstants.WSS_SAML2_TOKEN_TYPE;
     
+    protected Map<String, Object> properties;
+    
     protected boolean use200502Namespace;
     
     protected int ttl = 1800;
@@ -102,6 +105,7 @@ public class STSClientAction {
     
     private String keyType = HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER;
 
+
     public String getWsdlLocation() {
         return wsdlLocation;
     }
@@ -273,6 +277,10 @@ public class STSClientAction {
             LOG.error("Protocol {} not supported for realm {} ", serviceConfig.getProtocol(), realm);
             throw new ProcessingException(TYPE.BAD_REQUEST);
         }
+       
+        if (properties != null) {
+            sts.setProperties(properties);
+        }
         
         Element rpToken = null;
         try {
@@ -425,4 +433,12 @@ public class STSClientAction {
             }
         }
     }
+
+    public Map<String, Object> getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Map<String, Object> properties) {
+        this.properties = properties;
+    }
 }