Extended the ShibAttribute interface to accept a recipient(sharName).
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 19 Oct 2002 20:14:42 +0000 (20:14 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 19 Oct 2002 20:14:42 +0000 (20:14 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@325 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAResponder.java
src/edu/internet2/middleware/shibboleth/aa/ShibAttribute.java
src/edu/internet2/middleware/shibboleth/aaLocal/attributes/eduPersonAffiliation.java
src/edu/internet2/middleware/shibboleth/aaLocal/attributes/eduPersonEntitlement.java
src/edu/internet2/middleware/shibboleth/aaLocal/attributes/eduPersonPrincipalName.java

index 95bf862..af68450 100755 (executable)
@@ -169,7 +169,7 @@ public class AAResponder{
                                ArpAttribute aAttr = (ArpAttribute) it.next();
                                Attribute dAttr = aAttr.getDirAttribute(userCtx, true);
                                if (dAttr != null) {
-                                       SAMLAttribute sAttr = jndi2saml(dAttr);
+                                       SAMLAttribute sAttr = jndi2saml(dAttr, sharName);
                                        if (sAttr != null) {
                                                sAttrs.add(sAttr);
                                        }
@@ -326,7 +326,7 @@ public class AAResponder{
        return null;
     }
     
-       private SAMLAttribute jndi2saml(Attribute jAttr) throws NamingException, AAException {
+       private SAMLAttribute jndi2saml(Attribute jAttr, String recipient) throws NamingException, AAException {
 
                if (jAttr == null) {
                        return null;
@@ -345,7 +345,7 @@ public class AAResponder{
                        Class attrClass = Class.forName("edu.internet2.middleware.shibboleth.aaLocal.attributes." + jAttr.getID());
                        log.debug("Loaded the class for " + attrClass);
                        ShibAttribute sa = (ShibAttribute) attrClass.newInstance();
-                       return sa.toSamlAttribute(this.domain, vals.toArray());
+                       return sa.toSamlAttribute(this.domain, vals.toArray(), recipient);
                        
                } catch (SAMLException e) {
                        log.error("Error converting attribute to SAML (" + jAttr.getID() + ") :" + e.getMessage());
index b5213fc..84b968a 100755 (executable)
@@ -62,7 +62,7 @@ import org.opensaml.*;
 
 public interface ShibAttribute{
     
-    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values)
+    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values, String recipient)
        throws SAMLException;
 
 }
index 00cb22d..07c7b52 100644 (file)
@@ -17,7 +17,7 @@ import org.opensaml.*;
 public class eduPersonAffiliation implements ShibAttribute{
     
 
-    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values)
+    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values, String recipient)
        throws SAMLException{
 
        String[] scopes = new String[values.length];
index a5d32ea..770318b 100644 (file)
@@ -16,7 +16,7 @@ import org.opensaml.*;
 public class eduPersonEntitlement implements ShibAttribute{
     
 
-    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values)
+    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values, String recipient)
        throws SAMLException{
 
        return new SAMLAttribute("urn:mace:eduPerson:1.0:eduPersonEntitlement",
index e7b91cc..e8d07fa 100644 (file)
@@ -21,7 +21,7 @@ public class eduPersonPrincipalName implements ShibAttribute{
        private static Logger log = Logger.getLogger(eduPersonPrincipalName.class.getName());
     
 
-    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values)
+    public SAMLAttribute toSamlAttribute(String defaultScope, Object[] values, String recipient)
        throws SAMLException{
 
        String scopes[] = new String[1];