Author: coheigea
Date: Fri Feb  9 11:08:34 2018
New Revision: 1823637

URL: http://svn.apache.org/viewvc?rev=1823637&view=rev
Log:
WSS4J WSS-623 NameIdBean SPNameQualifier support

Signed-off-by: Colm O hEigeartaigh <cohei...@apache.org>

Modified:
    
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java
    
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
    
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/builder/SAML2ComponentBuilder.java

Modified: 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java?rev=1823637&r1=1823636&r2=1823637&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java
 (original)
+++ 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java
 Fri Feb  9 11:08:34 2018
@@ -26,6 +26,7 @@ public class NameIDBean {
     private String nameValue;
     private String nameIDFormat = 
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified";
     private String nameQualifier;
+    private String spNameQualifier;
     private String spProvidedID;
 
     /**
@@ -74,6 +75,14 @@ public class NameIDBean {
         this.nameQualifier = nameQualifier;
     }
 
+    public String getSPNameQualifier() {
+        return spNameQualifier;
+    }
+
+    public void setSPNameQualifier(String spNameQualifier) {
+        this.spNameQualifier = spNameQualifier;
+    }
+
     public String getSPProvidedID() {
         return spProvidedID;
     }

Modified: 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java?rev=1823637&r1=1823636&r2=1823637&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
 (original)
+++ 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
 Fri Feb  9 11:08:34 2018
@@ -168,6 +168,14 @@ public class SubjectBean {
         nameID.setNameIDFormat(subjectNameIDFormat);
     }
 
+    public String getSubjectNameSPNameQualifier() {
+        return nameID.getSPNameQualifier();
+    }
+
+    public void setSubjectNameSPNameQualifier(String 
subjectNameSPNameQualifier) {
+        nameID.setSPNameQualifier(subjectNameSPNameQualifier);
+    }
+
     public String getSubjectNameSPProvidedID() {
         return nameID.getSPProvidedID();
     }

Modified: 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/builder/SAML2ComponentBuilder.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/builder/SAML2ComponentBuilder.java?rev=1823637&r1=1823636&r2=1823637&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/builder/SAML2ComponentBuilder.java
 (original)
+++ 
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/builder/SAML2ComponentBuilder.java
 Fri Feb  9 11:08:34 2018
@@ -701,6 +701,7 @@ public final class SAML2ComponentBuilder
         NameIDBean nameIDBean = new NameIDBean();
         nameIDBean.setNameIDFormat(subject.getSubjectNameIDFormat());
         nameIDBean.setNameQualifier(subject.getSubjectNameQualifier());
+        nameIDBean.setSPNameQualifier(subject.getSubjectNameSPNameQualifier());
         nameIDBean.setSPProvidedID(subject.getSubjectNameSPProvidedID());
         nameIDBean.setNameValue(subject.getSubjectName());
         return createNameID(nameIDBean);
@@ -716,6 +717,7 @@ public final class SAML2ComponentBuilder
         nameID.setNameQualifier(nameIDBean.getNameQualifier());
         nameID.setFormat(nameIDBean.getNameIDFormat());
         nameID.setValue(nameIDBean.getNameValue());
+        nameID.setSPNameQualifier(nameIDBean.getSPNameQualifier());
         nameID.setSPProvidedID(nameIDBean.getSPProvidedID());
         return nameID;
     }


Reply via email to