ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1100256 - in /webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext: AssertionWrapper.java SAMLParms.java
Date Fri, 06 May 2011 15:46:20 GMT
Author: coheigea
Date: Fri May  6 15:46:20 2011
New Revision: 1100256

URL: http://svn.apache.org/viewvc?rev=1100256&view=rev
Log:
Add the ability to specify the SAML Version of the Assertion to be created through SAMLParms.

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/SAMLParms.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java?rev=1100256&r1=1100255&r2=1100256&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
(original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java
Fri May  6 15:46:20 2011
@@ -228,6 +228,9 @@ public class AssertionWrapper {
         }
 
         samlVersion = samlCallbacks[0].getSamlVersion();
+        if (samlVersion == null) {
+            samlVersion = parms.getSAMLVersion();
+        }
         String issuer = samlCallbacks[0].getIssuer();
         if (issuer == null && parms.getIssuer() != null) {
             issuer = parms.getIssuer();

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/SAMLParms.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/SAMLParms.java?rev=1100256&r1=1100255&r2=1100256&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/SAMLParms.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/ext/SAMLParms.java Fri
May  6 15:46:20 2011
@@ -21,6 +21,8 @@ package org.apache.ws.security.saml.ext;
 
 import javax.security.auth.callback.CallbackHandler;
 
+import org.opensaml.common.SAMLVersion;
+
 /**
  * Class SAMLParms is a parameter bean that is used to pass raw material from
  * the <code>AssertionWrapper</code> to the SAML builders during statement
@@ -30,6 +32,7 @@ import javax.security.auth.callback.Call
  */
 public class SAMLParms {
     private String issuer;
+    private SAMLVersion samlVersion;
     private CallbackHandler samlCallbackHandler;
 
     /**
@@ -51,6 +54,22 @@ public class SAMLParms {
     }
     
     /**
+     * Get the SAML Version of the SAML Assertion to generate
+     * @return the SAML Version of the SAML Assertion to generate
+     */
+    public SAMLVersion getSAMLVersion() {
+        return samlVersion;
+    }
+    
+    /**
+     * Set the SAML Version of the SAML Assertion to generate
+     * @param samlVersion the SAML Version of the SAML Assertion to generate
+     */
+    public void setSAMLVersion(SAMLVersion samlVersion) {
+        this.samlVersion = samlVersion;
+    }
+    
+    /**
      * Get the CallbackHandler instance used to populate the SAML Assertion content
      * @return the CallbackHandler instance used to populate the SAML Assertion content
      */



Mime
View raw message