import java.util.List;
import org.apache.log4j.Logger;
+import org.opensaml.QName;
import org.opensaml.SAMLAttribute;
import org.opensaml.SAMLException;
import org.opensaml.XML;
private static Logger log = Logger.getLogger(AAAttribute.class.getName());
private boolean resolved = false;
+ /** A hedge in case we are wrong about no longer needing xsi:type. Remove this, if possible, in 1.3. **/
+ static boolean typeHack = false;
public final static String SHIB_ATTRIBUTE_NAMESPACE_URI = "urn:mace:shibboleth:1.0:attributeNamespace:uri";
super(
name,
SHIB_ATTRIBUTE_NAMESPACE_URI,
- null,
+ !typeHack? null: new QName("urn:mace:shibboleth:1.0", "AttributeValueType"),
defaultLifetime,
null);
}
if (attribute != null && !attribute.equals("")) {
passThruErrors = Boolean.valueOf(attribute).booleanValue();
}
+
+ //xsi:type hack
+ attribute = ((Element) config).getAttribute("typeHack");
+ if (attribute != null && !attribute.equals("")) {
+ if(Boolean.valueOf(attribute).booleanValue()) {
+ AAAttribute.typeHack = true;
+ log.debug("Enabling xsi:type hack.");
+ }
+ }
log.debug("Global config: (resolverConfig) = (" + getResolverConfigLocation() + ").");
log.debug("Global config: (passThruErrors) = (" + passThruErrors() + ").");
<xs:attribute name="passThruErrors" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="authHeaderName" type="xs:string" use="optional"/>
<xs:attribute name="maxHSThreads" type="xs:integer" use="optional"/>
+ <xs:attribute name="typeHack" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
</xs:element>