[java-opensaml] 12/24: OSJ-96 - Fix unmarshallers to evaluate attribute namespaces and not just local names
Brent Putman
putmanb at georgetown.edu
Wed Sep 27 16:46:06 EDT 2017
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch maint-3.3
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=80010cc73490889f62cb4af0bb93a0cfdc34d9e6
commit 80010cc73490889f62cb4af0bb93a0cfdc34d9e6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 15 23:11:46 2017 +0000
OSJ-96 - Fix unmarshallers to evaluate attribute namespaces and not just local names
https://issues.shibboleth.net/jira/browse/OSJ-96
Added guards to attribute processing in SAML classes.
---
.../saml2alg/impl/DigestMethodUnmarshaller.java | 9 +--
.../saml2alg/impl/SigningMethodUnmarshaller.java | 22 ++++---
.../saml2cb/impl/ChannelBindingsUnmarshaller.java | 7 +-
.../impl/DelegateUnmarshaller.java | 20 +++---
.../DelegationRestrictionTypeUnmarshaller.java | 2 +-
.../impl/QueryDescriptorTypeUnmarshaller.java | 7 +-
.../impl/PublicationInfoUnmarshaller.java | 24 ++++---
.../saml2mdrpi/impl/PublicationUnmarshaller.java | 20 +++---
.../impl/RegistrationInfoUnmarshaller.java | 18 +++--
.../saml/ext/saml2mdui/impl/LogoUnmarshaller.java | 11 ++--
.../ext/samlec/impl/SessionKeyUnmarshaller.java | 7 +-
.../saml/saml1/core/impl/ActionUnmarshaller.java | 17 ++---
.../saml1/core/impl/AssertionUnmarshaller.java | 64 +++++++++---------
.../core/impl/AttributeDesignatorUnmarshaller.java | 16 +++--
.../core/impl/AttributeQueryUnmarshaller.java | 8 ++-
.../core/impl/AuthenticationQueryUnmarshaller.java | 6 +-
.../impl/AuthenticationStatementUnmarshaller.java | 20 +++---
.../core/impl/AuthorityBindingUnmarshaller.java | 19 ++++--
.../AuthorizationDecisionQueryUnmarshaller.java | 10 +--
...AuthorizationDecisionStatementUnmarshaller.java | 36 +++++-----
.../saml1/core/impl/ConditionsUnmarshaller.java | 22 ++++---
.../core/impl/NameIdentifierUnmarshaller.java | 17 +++--
.../core/impl/RequestAbstractTypeUnmarshaller.java | 73 ++++++++++----------
.../impl/ResponseAbstractTypeUnmarshaller.java | 77 ++++++++++++----------
.../saml1/core/impl/StatusCodeUnmarshaller.java | 6 +-
.../core/impl/SubjectLocalityUnmarshaller.java | 15 +++--
.../core/impl/AbstractNameIDTypeUnmarshaller.java | 35 +++++-----
.../saml/saml2/core/impl/ActionUnmarshaller.java | 17 ++---
.../saml2/core/impl/AssertionUnmarshaller.java | 25 ++++---
.../saml2/core/impl/AttributeUnmarshaller.java | 23 ++++---
.../saml2/core/impl/AuthnQueryUnmarshaller.java | 26 ++++----
.../saml2/core/impl/AuthnRequestUnmarshaller.java | 55 +++++++++-------
.../core/impl/AuthnStatementUnmarshaller.java | 27 +++++---
.../core/impl/AuthzDecisionQueryUnmarshaller.java | 28 ++++----
.../impl/AuthzDecisionStatementUnmarshaller.java | 31 +++++----
.../saml/saml2/core/impl/BaseIDUnmarshaller.java | 16 +++--
.../saml2/core/impl/ConditionsUnmarshaller.java | 21 +++---
.../saml/saml2/core/impl/IDPEntryUnmarshaller.java | 19 ++++--
.../saml2/core/impl/LogoutRequestUnmarshaller.java | 37 ++++++-----
.../saml2/core/impl/NameIDPolicyUnmarshaller.java | 23 ++++---
.../core/impl/ProxyRestrictionUnmarshaller.java | 8 ++-
.../core/impl/RequestAbstractTypeUnmarshaller.java | 51 +++++++-------
.../impl/RequestedAuthnContextUnmarshaller.java | 32 ++++-----
.../saml/saml2/core/impl/ScopingUnmarshaller.java | 26 ++++----
.../saml2/core/impl/StatusCodeUnmarshaller.java | 25 +++----
.../core/impl/StatusResponseTypeUnmarshaller.java | 55 +++++++++-------
.../impl/SubjectConfirmationDataUnmarshaller.java | 32 +++++----
.../core/impl/SubjectConfirmationUnmarshaller.java | 8 ++-
.../core/impl/SubjectLocalityUnmarshaller.java | 15 +++--
.../AdditionalMetadataLocationUnmarshaller.java | 9 ++-
.../impl/AffiliationDescriptorUnmarshaller.java | 29 ++++----
.../AttributeConsumingServiceUnmarshaller.java | 16 +++--
.../metadata/impl/ContactPersonUnmarshaller.java | 27 ++++----
.../saml2/metadata/impl/EndpointUnmarshaller.java | 20 +++---
.../impl/EntitiesDescriptorUnmarshaller.java | 29 ++++----
.../impl/EntityDescriptorUnmarshaller.java | 28 ++++----
.../impl/IDPSSODescriptorUnmarshaller.java | 8 ++-
.../metadata/impl/IndexedEndpointUnmarshaller.java | 15 +++--
.../metadata/impl/KeyDescriptorUnmarshaller.java | 10 +--
.../metadata/impl/LocalizedNameUnmarshaller.java | 19 +++---
.../metadata/impl/LocalizedURIUnmarshaller.java | 19 +++---
.../metadata/impl/OrganizationUnmarshaller.java | 10 ++-
.../impl/RequestedAttributeUnmarshaller.java | 7 +-
.../metadata/impl/RoleDescriptorUnmarshaller.java | 37 ++++++-----
.../metadata/impl/SPSSODescriptorUnmarshaller.java | 17 +++--
.../metadata/impl/AffiliationDescriptorTest.java | 4 +-
.../saml2/metadata/impl/ContactPersonTest.java | 4 +-
.../saml2/metadata/impl/EntityDescriptorTest.java | 4 +-
.../saml2/metadata/impl/IDPSSODescriptorTest.java | 4 +-
.../saml/saml2/metadata/impl/OrganizationTest.java | 4 +-
.../metadata/impl/SingleLogoutServiceTest.java | 4 +-
.../AffiliationDescriptorUnknownAttributes.xml | 2 +-
.../impl/ContactPersonUnknownAttributes.xml | 2 +-
.../impl/EntityDescriptorUnknownAttributes.xml | 2 +-
.../impl/IDPSSODescriptorUnknownAttributes.xml | 2 +-
.../impl/OrganizationUnknownAttributes.xml | 2 +-
.../impl/SingleLogoutServiceUnknownAttributes.xml | 2 +-
77 files changed, 876 insertions(+), 648 deletions(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/DigestMethodUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/DigestMethodUnmarshaller.java
index 7a20127..5ac2bc5 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/DigestMethodUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/DigestMethodUnmarshaller.java
@@ -33,20 +33,21 @@ public class DigestMethodUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(@Nonnull XMLObject parentXMLObject, @Nonnull XMLObject childXMLObject)
throws UnmarshallingException {
- DigestMethod digestMethod = (DigestMethod) parentXMLObject;
+ final DigestMethod digestMethod = (DigestMethod) parentXMLObject;
digestMethod.getUnknownXMLObjects().add(childXMLObject);
}
/** {@inheritDoc} */
protected void processAttribute(@Nonnull XMLObject xmlObject, @Nonnull Attr attribute)
throws UnmarshallingException {
- DigestMethod digestMethod = (DigestMethod) xmlObject;
+ final DigestMethod digestMethod = (DigestMethod) xmlObject;
- if (attribute.getLocalName().equals(DigestMethod.ALGORITHM_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(DigestMethod.ALGORITHM_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
digestMethod.setAlgorithm(attribute.getValue());
} else {
super.processAttribute(xmlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodUnmarshaller.java
index d696c28..6e63019 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodUnmarshaller.java
@@ -33,24 +33,28 @@ public class SigningMethodUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(@Nonnull XMLObject parentXMLObject, @Nonnull XMLObject childXMLObject)
throws UnmarshallingException {
- SigningMethod signingMethod = (SigningMethod) parentXMLObject;
+ final SigningMethod signingMethod = (SigningMethod) parentXMLObject;
signingMethod.getUnknownXMLObjects().add(childXMLObject);
}
/** {@inheritDoc} */
protected void processAttribute(@Nonnull XMLObject xmlObject, @Nonnull Attr attribute)
throws UnmarshallingException {
- SigningMethod signingMethod = (SigningMethod) xmlObject;
+ final SigningMethod signingMethod = (SigningMethod) xmlObject;
- if (attribute.getLocalName().equals(SigningMethod.ALGORITHM_ATTRIB_NAME)) {
- signingMethod.setAlgorithm(attribute.getValue());
- } else if (attribute.getLocalName().equals(SigningMethod.MIN_KEY_SIZE_ATTRIB_NAME)) {
- signingMethod.setMinKeySize(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(SigningMethod.MAX_KEY_SIZE_ATTRIB_NAME)) {
- signingMethod.setMaxKeySize(Integer.valueOf(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(SigningMethod.ALGORITHM_ATTRIB_NAME)) {
+ signingMethod.setAlgorithm(attribute.getValue());
+ } else if (attribute.getLocalName().equals(SigningMethod.MIN_KEY_SIZE_ATTRIB_NAME)) {
+ signingMethod.setMinKeySize(Integer.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(SigningMethod.MAX_KEY_SIZE_ATTRIB_NAME)) {
+ signingMethod.setMaxKeySize(Integer.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(xmlObject, attribute);
+ }
} else {
super.processAttribute(xmlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2cb/impl/ChannelBindingsUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2cb/impl/ChannelBindingsUnmarshaller.java
index 83cf5ed..8ef3faf 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2cb/impl/ChannelBindingsUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2cb/impl/ChannelBindingsUnmarshaller.java
@@ -35,10 +35,11 @@ public class ChannelBindingsUnmarshaller extends XSBase64BinaryUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
- ChannelBindings cb = (ChannelBindings) xmlObject;
+ final ChannelBindings cb = (ChannelBindings) xmlObject;
- QName attrName = QNameSupport.getNodeQName(attribute);
- if (attribute.getLocalName().equals(ChannelBindings.TYPE_ATTRIB_NAME)) {
+ final QName attrName = QNameSupport.getNodeQName(attribute);
+ if (attribute.getLocalName().equals(ChannelBindings.TYPE_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
cb.setType(attribute.getValue());
} else if (ChannelBindings.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
cb.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegateUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegateUnmarshaller.java
index a0033aa..de99629 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegateUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegateUnmarshaller.java
@@ -35,13 +35,17 @@ public class DelegateUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Delegate delegate = (Delegate) samlObject;
-
- String attrName = attribute.getLocalName();
- if (Delegate.CONFIRMATION_METHOD_ATTRIB_NAME.equals(attrName)) {
- delegate.setConfirmationMethod(attribute.getValue());
- } else if (Delegate.DELEGATION_INSTANT_ATTRIB_NAME.equals(attrName)) {
- delegate.setDelegationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ final Delegate delegate = (Delegate) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ String attrName = attribute.getLocalName();
+ if (Delegate.CONFIRMATION_METHOD_ATTRIB_NAME.equals(attrName)) {
+ delegate.setConfirmationMethod(attribute.getValue());
+ } else if (Delegate.DELEGATION_INSTANT_ATTRIB_NAME.equals(attrName)) {
+ delegate.setDelegationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
@@ -63,4 +67,4 @@ public class DelegateUnmarshaller extends AbstractSAMLObjectUnmarshaller {
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegationRestrictionTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegationRestrictionTypeUnmarshaller.java
index 9ed8b61..5ba48bd 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegationRestrictionTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2delrestrict/impl/DelegationRestrictionTypeUnmarshaller.java
@@ -31,7 +31,7 @@ public class DelegationRestrictionTypeUnmarshaller extends AbstractSAMLObjectUnm
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- DelegationRestrictionType drt = (DelegationRestrictionType) parentSAMLObject;
+ final DelegationRestrictionType drt = (DelegationRestrictionType) parentSAMLObject;
if (childSAMLObject instanceof Delegate) {
drt.getDelegates().add((Delegate) childSAMLObject);
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdquery/impl/QueryDescriptorTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdquery/impl/QueryDescriptorTypeUnmarshaller.java
index 47091c9..6ad548d 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdquery/impl/QueryDescriptorTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdquery/impl/QueryDescriptorTypeUnmarshaller.java
@@ -31,7 +31,7 @@ public class QueryDescriptorTypeUnmarshaller extends RoleDescriptorUnmarshaller
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- QueryDescriptorType descriptor = (QueryDescriptorType) parentSAMLObject;
+ final QueryDescriptorType descriptor = (QueryDescriptorType) parentSAMLObject;
if (childSAMLObject instanceof NameIDFormat) {
descriptor.getNameIDFormat().add((NameIDFormat) childSAMLObject);
@@ -42,9 +42,10 @@ public class QueryDescriptorTypeUnmarshaller extends RoleDescriptorUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- QueryDescriptorType descriptor = (QueryDescriptorType) samlObject;
+ final QueryDescriptorType descriptor = (QueryDescriptorType) samlObject;
- if (attribute.getLocalName().equals(QueryDescriptorType.WANT_ASSERTIONS_SIGNED_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(QueryDescriptorType.WANT_ASSERTIONS_SIGNED_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
descriptor.setWantAssertionsSigned(XSBooleanValue.valueOf(attribute.getValue()));
} else {
super.processAttribute(samlObject, attribute);
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationInfoUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationInfoUnmarshaller.java
index 6274b33..fb70821 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationInfoUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationInfoUnmarshaller.java
@@ -33,7 +33,7 @@ public class PublicationInfoUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- PublicationInfo info = (PublicationInfo) parentObject;
+ final PublicationInfo info = (PublicationInfo) parentObject;
if (childObject instanceof UsagePolicy) {
info.getUsagePolicies().add((UsagePolicy)childObject);
@@ -44,17 +44,21 @@ public class PublicationInfoUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- PublicationInfo info = (PublicationInfo) samlObject;
-
- if (PublicationInfo.PUBLISHER_ATTRIB_NAME.equals(attribute.getName())) {
- info.setPublisher(attribute.getValue());
- } else if (PublicationInfo.CREATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
- info.setCreationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (PublicationInfo.PUBLICATION_ID_ATTRIB_NAME.equals(attribute.getName())) {
- info.setPublicationId(attribute.getValue());
+ final PublicationInfo info = (PublicationInfo) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (PublicationInfo.PUBLISHER_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setPublisher(attribute.getValue());
+ } else if (PublicationInfo.CREATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setCreationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (PublicationInfo.PUBLICATION_ID_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setPublicationId(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationUnmarshaller.java
index dbfd276..6c5ca45 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/PublicationUnmarshaller.java
@@ -32,17 +32,21 @@ public class PublicationUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Publication info = (Publication) samlObject;
+ final Publication info = (Publication) samlObject;
- if (Publication.PUBLISHER_ATTRIB_NAME.equals(attribute.getName())) {
- info.setPublisher(attribute.getValue());
- } else if (Publication.CREATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
- info.setCreationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (Publication.PUBLICATION_ID_ATTRIB_NAME.equals(attribute.getName())) {
- info.setPublicationId(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (Publication.PUBLISHER_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setPublisher(attribute.getValue());
+ } else if (Publication.CREATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setCreationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (Publication.PUBLICATION_ID_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setPublicationId(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/RegistrationInfoUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/RegistrationInfoUnmarshaller.java
index e1c5e76..89b1d1a 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/RegistrationInfoUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdrpi/impl/RegistrationInfoUnmarshaller.java
@@ -33,7 +33,7 @@ public class RegistrationInfoUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- RegistrationInfo info = (RegistrationInfo) parentObject;
+ final RegistrationInfo info = (RegistrationInfo) parentObject;
if (childObject instanceof RegistrationPolicy) {
info.getRegistrationPolicies().add((RegistrationPolicy)childObject);
@@ -44,15 +44,19 @@ public class RegistrationInfoUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- RegistrationInfo info = (RegistrationInfo) samlObject;
+ final RegistrationInfo info = (RegistrationInfo) samlObject;
- if (RegistrationInfo.REGISTRATION_AUTHORITY_ATTRIB_NAME.equals(attribute.getName())) {
- info.setRegistrationAuthority(attribute.getValue());
- } else if (RegistrationInfo.REGISTRATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
- info.setRegistrationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ if (attribute.getNamespaceURI() == null) {
+ if (RegistrationInfo.REGISTRATION_AUTHORITY_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setRegistrationAuthority(attribute.getValue());
+ } else if (RegistrationInfo.REGISTRATION_INSTANT_ATTRIB_NAME.equals(attribute.getName())) {
+ info.setRegistrationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdui/impl/LogoUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdui/impl/LogoUnmarshaller.java
index 0d98fa0..e008dc6 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdui/impl/LogoUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/saml2mdui/impl/LogoUnmarshaller.java
@@ -30,26 +30,27 @@ import org.w3c.dom.Attr;
* A thread-safe Unmarshaller for {@link org.opensaml.saml.ext.saml2mdui.Logo} objects.
*/
public class LogoUnmarshaller extends AbstractSAMLObjectUnmarshaller {
-
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
- Logo logo = (Logo) samlObject;
+ final Logo logo = (Logo) samlObject;
logo.setURL(elementContent);
}
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Logo logo = (Logo) samlObject;
+ final Logo logo = (Logo) samlObject;
if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
&& XMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
logo.setXMLLang(attribute.getValue());
- } else if (attribute.getLocalName().equals(Logo.HEIGHT_ATTR_NAME)) {
+ } else if (attribute.getLocalName().equals(Logo.HEIGHT_ATTR_NAME) && attribute.getNamespaceURI() == null) {
logo.setHeight(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(Logo.WIDTH_ATTR_NAME)) {
+ } else if (attribute.getLocalName().equals(Logo.WIDTH_ATTR_NAME) && attribute.getNamespaceURI() == null) {
logo.setWidth(Integer.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
}
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/samlec/impl/SessionKeyUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/samlec/impl/SessionKeyUnmarshaller.java
index 3ec41fa..9c36f3c 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/samlec/impl/SessionKeyUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/ext/samlec/impl/SessionKeyUnmarshaller.java
@@ -50,14 +50,15 @@ public class SessionKeyUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SessionKey key = (SessionKey) samlObject;
+ final SessionKey key = (SessionKey) samlObject;
- QName attrName = QNameSupport.getNodeQName(attribute);
+ final QName attrName = QNameSupport.getNodeQName(attribute);
if (SessionKey.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
key.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
} else if (SessionKey.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
key.setSOAP11Actor(attribute.getValue());
- } else if (attribute.getLocalName().equals(SessionKey.ALGORITHM_ATTRIB_NAME)) {
+ } else if (attribute.getLocalName().equals(SessionKey.ALGORITHM_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
key.setAlgorithm(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ActionUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ActionUnmarshaller.java
index 63badfd..62b8a77 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ActionUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ActionUnmarshaller.java
@@ -29,19 +29,20 @@ import org.w3c.dom.Attr;
public class ActionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
+ protected void processElementContent(XMLObject samlObject, String elementContent) {
+ final Action action = (Action) samlObject;
+ action.setContents(elementContent);
+ }
+
+ /** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- if (Action.NAMESPACE_ATTRIB_NAME.equals(attribute.getLocalName())) {
- Action action = (Action) samlObject;
+ if (Action.NAMESPACE_ATTRIB_NAME.equals(attribute.getLocalName()) && attribute.getNamespaceURI() == null) {
+ final Action action = (Action) samlObject;
action.setNamespace(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
- Action action = (Action) samlObject;
- action.setContents(elementContent);
- }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AssertionUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AssertionUnmarshaller.java
index df8857f..42b0bcb 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AssertionUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AssertionUnmarshaller.java
@@ -41,7 +41,7 @@ public class AssertionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
public XMLObject unmarshall(Element domElement) throws UnmarshallingException {
// After regular unmarshalling, check the minor version and set ID-ness if not SAML 1.0
- Assertion assertion = (Assertion) super.unmarshall(domElement);
+ final Assertion assertion = (Assertion) super.unmarshall(domElement);
if (assertion.getMinorVersion() != 0 && !Strings.isNullOrEmpty(assertion.getID())) {
domElement.setIdAttributeNS(null, Assertion.ID_ATTRIB_NAME, true);
}
@@ -52,7 +52,7 @@ public class AssertionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Assertion assertion = (Assertion) parentSAMLObject;
+ final Assertion assertion = (Assertion) parentSAMLObject;
if (childSAMLObject instanceof Signature) {
assertion.setSignature((Signature) childSAMLObject);
@@ -71,36 +71,40 @@ public class AssertionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Assertion assertion = (Assertion) samlObject;
+ final Assertion assertion = (Assertion) samlObject;
- if (Assertion.ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
- assertion.setID(attribute.getValue());
- } else if (Assertion.ISSUER_ATTRIB_NAME.equals(attribute.getLocalName())) {
- assertion.setIssuer(attribute.getValue());
- } else if (Assertion.ISSUEINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- assertion.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (Assertion.MAJORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
- int major;
- try {
- major = Integer.parseInt(attribute.getValue());
- if (major != 1) {
- throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ if (attribute.getNamespaceURI() == null) {
+ if (Assertion.ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ assertion.setID(attribute.getValue());
+ } else if (Assertion.ISSUER_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ assertion.setIssuer(attribute.getValue());
+ } else if (Assertion.ISSUEINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ assertion.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (Assertion.MAJORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ int major;
+ try {
+ major = Integer.parseInt(attribute.getValue());
+ if (major != 1) {
+ throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ }
+ } catch (final NumberFormatException n) {
+ throw new UnmarshallingException(n);
}
- } catch (final NumberFormatException n) {
- throw new UnmarshallingException(n);
- }
- } else if (Assertion.MINORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
- int minor;
- try {
- minor = Integer.parseInt(attribute.getValue());
- } catch (NumberFormatException n) {
- throw new UnmarshallingException(n);
- }
- if (minor == 0) {
- assertion.setVersion(SAMLVersion.VERSION_10);
- } else if (minor == 1) {
- assertion.setVersion(SAMLVersion.VERSION_11);
+ } else if (Assertion.MINORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ int minor;
+ try {
+ minor = Integer.parseInt(attribute.getValue());
+ } catch (final NumberFormatException n) {
+ throw new UnmarshallingException(n);
+ }
+ if (minor == 0) {
+ assertion.setVersion(SAMLVersion.VERSION_10);
+ } else if (minor == 1) {
+ assertion.setVersion(SAMLVersion.VERSION_11);
+ }
+ } else {
+ super.processAttribute(samlObject, attribute);
}
} else {
super.processAttribute(samlObject, attribute);
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeDesignatorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeDesignatorUnmarshaller.java
index 7866bc7..70a1dfe 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeDesignatorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeDesignatorUnmarshaller.java
@@ -29,15 +29,19 @@ public class AttributeDesignatorUnmarshaller extends AbstractSAMLObjectUnmarshal
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AttributeDesignator designator = (AttributeDesignator) samlObject;
+ final AttributeDesignator designator = (AttributeDesignator) samlObject;
- if (AttributeDesignator.ATTRIBUTENAME_ATTRIB_NAME.equals(attribute.getLocalName())) {
- designator.setAttributeName(attribute.getValue());
- } else if (AttributeDesignator.ATTRIBUTENAMESPACE_ATTRIB_NAME.equals(attribute.getLocalName())) {
- designator.setAttributeNamespace(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (AttributeDesignator.ATTRIBUTENAME_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ designator.setAttributeName(attribute.getValue());
+ } else if (AttributeDesignator.ATTRIBUTENAMESPACE_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ designator.setAttributeNamespace(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeQueryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeQueryUnmarshaller.java
index 6eca0fc..6f4cc28 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeQueryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AttributeQueryUnmarshaller.java
@@ -32,7 +32,7 @@ public class AttributeQueryUnmarshaller extends SubjectQueryUnmarshaller {
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AttributeQuery attributeQuery = (AttributeQuery) parentSAMLObject;
+ final AttributeQuery attributeQuery = (AttributeQuery) parentSAMLObject;
if (childSAMLObject instanceof AttributeDesignator) {
attributeQuery.getAttributeDesignators().add((AttributeDesignator) childSAMLObject);
@@ -44,12 +44,14 @@ public class AttributeQueryUnmarshaller extends SubjectQueryUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AttributeQuery attributeQuery = (AttributeQuery) samlObject;
+ final AttributeQuery attributeQuery = (AttributeQuery) samlObject;
- if (attribute.getLocalName().equals(AttributeQuery.RESOURCE_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(AttributeQuery.RESOURCE_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
attributeQuery.setResource(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationQueryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationQueryUnmarshaller.java
index 6a83a44..53fbdad 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationQueryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationQueryUnmarshaller.java
@@ -29,12 +29,14 @@ public class AuthenticationQueryUnmarshaller extends SubjectQueryUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;
+ final AuthenticationQuery authenticationQuery = (AuthenticationQuery) samlObject;
- if (AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ if (AuthenticationQuery.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())
+ && attribute.getNamespaceURI() == null) {
authenticationQuery.setAuthenticationMethod(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationStatementUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationStatementUnmarshaller.java
index b15df2e..ed38997 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationStatementUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthenticationStatementUnmarshaller.java
@@ -37,7 +37,7 @@ public class AuthenticationStatementUnmarshaller extends SubjectStatementUnmarsh
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AuthenticationStatement authenticationStatement = (AuthenticationStatement) parentSAMLObject;
+ final AuthenticationStatement authenticationStatement = (AuthenticationStatement) parentSAMLObject;
if (childSAMLObject instanceof SubjectLocality) {
authenticationStatement.setSubjectLocality((SubjectLocality) childSAMLObject);
@@ -50,14 +50,18 @@ public class AuthenticationStatementUnmarshaller extends SubjectStatementUnmarsh
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthenticationStatement authenticationStatement = (AuthenticationStatement) samlObject;
+ final AuthenticationStatement authenticationStatement = (AuthenticationStatement) samlObject;
- if (AuthenticationStatement.AUTHENTICATIONINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- DateTime value = new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC());
- authenticationStatement.setAuthenticationInstant(value);
- } else if (AuthenticationStatement.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())) {
- authenticationStatement.setAuthenticationMethod(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (AuthenticationStatement.AUTHENTICATIONINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ DateTime value = new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC());
+ authenticationStatement.setAuthenticationInstant(value);
+ } else if (AuthenticationStatement.AUTHENTICATIONMETHOD_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ authenticationStatement.setAuthenticationMethod(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorityBindingUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorityBindingUnmarshaller.java
index f4bfba3..fc57ed1 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorityBindingUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorityBindingUnmarshaller.java
@@ -34,16 +34,21 @@ public class AuthorityBindingUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthorityBinding authorityBinding = (AuthorityBinding) samlObject;
+ final AuthorityBinding authorityBinding = (AuthorityBinding) samlObject;
- if (AuthorityBinding.AUTHORITYKIND_ATTRIB_NAME.equals(attribute.getLocalName())) {
- authorityBinding.setAuthorityKind(AttributeSupport.getAttributeValueAsQName(attribute));
- } else if (AuthorityBinding.LOCATION_ATTRIB_NAME.equals(attribute.getLocalName())) {
- authorityBinding.setLocation(attribute.getValue());
- } else if (AuthorityBinding.BINDING_ATTRIB_NAME.equals(attribute.getLocalName())) {
- authorityBinding.setBinding(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (AuthorityBinding.AUTHORITYKIND_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ authorityBinding.setAuthorityKind(AttributeSupport.getAttributeValueAsQName(attribute));
+ } else if (AuthorityBinding.LOCATION_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ authorityBinding.setLocation(attribute.getValue());
+ } else if (AuthorityBinding.BINDING_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ authorityBinding.setBinding(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionQueryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionQueryUnmarshaller.java
index 619867b..f7c505e 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionQueryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionQueryUnmarshaller.java
@@ -33,8 +33,7 @@ public class AuthorizationDecisionQueryUnmarshaller extends SubjectQueryUnmarsha
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AuthorizationDecisionQuery authorizationDecisionQuery;
- authorizationDecisionQuery = (AuthorizationDecisionQuery) parentSAMLObject;
+ final AuthorizationDecisionQuery authorizationDecisionQuery = (AuthorizationDecisionQuery) parentSAMLObject;
if (childSAMLObject instanceof Action) {
authorizationDecisionQuery.getActions().add((Action) childSAMLObject);
@@ -48,13 +47,14 @@ public class AuthorizationDecisionQueryUnmarshaller extends SubjectQueryUnmarsha
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthorizationDecisionQuery authorizationDecisionQuery;
- authorizationDecisionQuery = (AuthorizationDecisionQuery) samlObject;
+ final AuthorizationDecisionQuery authorizationDecisionQuery = (AuthorizationDecisionQuery) samlObject;
- if (attribute.getLocalName().equals(AuthorizationDecisionQuery.RESOURCE_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(AuthorizationDecisionQuery.RESOURCE_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
authorizationDecisionQuery.setResource(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionStatementUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionStatementUnmarshaller.java
index accf7ca..dcd987d 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionStatementUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/AuthorizationDecisionStatementUnmarshaller.java
@@ -39,8 +39,8 @@ public class AuthorizationDecisionStatementUnmarshaller extends SubjectStatement
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AuthorizationDecisionStatement authorizationDecisionStatement;
- authorizationDecisionStatement = (AuthorizationDecisionStatement) parentSAMLObject;
+ final AuthorizationDecisionStatement authorizationDecisionStatement =
+ (AuthorizationDecisionStatement) parentSAMLObject;
if (childSAMLObject instanceof Action) {
authorizationDecisionStatement.getActions().add((Action) childSAMLObject);
@@ -54,23 +54,27 @@ public class AuthorizationDecisionStatementUnmarshaller extends SubjectStatement
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthorizationDecisionStatement authorizationDecisionStatement;
- authorizationDecisionStatement = (AuthorizationDecisionStatement) samlObject;
+ final AuthorizationDecisionStatement authorizationDecisionStatement =
+ (AuthorizationDecisionStatement) samlObject;
- if (AuthorizationDecisionStatement.DECISION_ATTRIB_NAME.equals(attribute.getLocalName())) {
- String value = attribute.getValue();
- if (value.equals(DecisionTypeEnumeration.PERMIT.toString())) {
- authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.PERMIT);
- } else if (value.equals(DecisionTypeEnumeration.DENY.toString())) {
- authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.DENY);
- } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
- authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.INDETERMINATE);
+ if (attribute.getNamespaceURI() == null) {
+ if (AuthorizationDecisionStatement.DECISION_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ final String value = attribute.getValue();
+ if (value.equals(DecisionTypeEnumeration.PERMIT.toString())) {
+ authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.PERMIT);
+ } else if (value.equals(DecisionTypeEnumeration.DENY.toString())) {
+ authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.DENY);
+ } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
+ authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.INDETERMINATE);
+ } else {
+ log.error("Unknown value for DecisionType '" + value + "'");
+ throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
+ }
+ } else if (AuthorizationDecisionStatement.RESOURCE_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ authorizationDecisionStatement.setResource(attribute.getValue());
} else {
- log.error("Unknown value for DecisionType '" + value + "'");
- throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
+ super.processAttribute(samlObject, attribute);
}
- } else if (AuthorizationDecisionStatement.RESOURCE_ATTRIB_NAME.equals(attribute.getLocalName())) {
- authorizationDecisionStatement.setResource(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ConditionsUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ConditionsUnmarshaller.java
index 0cf0479..9b10e94 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ConditionsUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ConditionsUnmarshaller.java
@@ -36,7 +36,7 @@ public class ConditionsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Conditions conditions = (Conditions) parentSAMLObject;
+ final Conditions conditions = (Conditions) parentSAMLObject;
if (childSAMLObject instanceof Condition) {
conditions.getConditions().add((Condition) childSAMLObject);
@@ -48,16 +48,20 @@ public class ConditionsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Conditions conditions = (Conditions) samlObject;
+ final Conditions conditions = (Conditions) samlObject;
- if (Conditions.NOTBEFORE_ATTRIB_NAME.equals(attribute.getLocalName())
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- conditions.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (Conditions.NOTONORAFTER_ATTRIB_NAME.equals(attribute.getLocalName())
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- conditions.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ if (attribute.getNamespaceURI() == null) {
+ if (Conditions.NOTBEFORE_ATTRIB_NAME.equals(attribute.getLocalName())
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ conditions.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (Conditions.NOTONORAFTER_ATTRIB_NAME.equals(attribute.getLocalName())
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ conditions.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
- processAttribute(samlObject, attribute);
+ super.processAttribute(samlObject, attribute);
}
}
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java
index a2a2568..cb7cdb1 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java
@@ -30,12 +30,16 @@ public class NameIdentifierUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- NameIdentifier nameIdentifier = (NameIdentifier) samlObject;
+ final NameIdentifier nameIdentifier = (NameIdentifier) samlObject;
- if (NameIdentifier.FORMAT_ATTRIB_NAME.equals(attribute.getLocalName())) {
- nameIdentifier.setFormat(attribute.getValue());
- } else if (NameIdentifier.NAMEQUALIFIER_ATTRIB_NAME.equals(attribute.getLocalName())) {
- nameIdentifier.setNameQualifier(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (NameIdentifier.FORMAT_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ nameIdentifier.setFormat(attribute.getValue());
+ } else if (NameIdentifier.NAMEQUALIFIER_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ nameIdentifier.setNameQualifier(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
@@ -43,7 +47,8 @@ public class NameIdentifierUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
- NameIdentifier nameIdentifier = (NameIdentifier) samlObject;
+ final NameIdentifier nameIdentifier = (NameIdentifier) samlObject;
nameIdentifier.setValue(elementContent);
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/RequestAbstractTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/RequestAbstractTypeUnmarshaller.java
index 0522ec6..f2e8992 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/RequestAbstractTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/RequestAbstractTypeUnmarshaller.java
@@ -21,6 +21,8 @@
package org.opensaml.saml.saml1.core.impl;
+import javax.annotation.Nonnull;
+
import org.joda.time.DateTime;
import org.joda.time.chrono.ISOChronology;
import org.opensaml.core.xml.XMLObject;
@@ -43,12 +45,12 @@ import com.google.common.base.Strings;
public abstract class RequestAbstractTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** Logger. */
- private final Logger log = LoggerFactory.getLogger(RequestAbstractType.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(RequestAbstractType.class);
/** {@inheritDoc} */
public XMLObject unmarshall(Element domElement) throws UnmarshallingException {
// After regular unmarshalling, check the minor version and set ID-ness if not SAML 1.0
- RequestAbstractType request = (RequestAbstractType) super.unmarshall(domElement);
+ final RequestAbstractType request = (RequestAbstractType) super.unmarshall(domElement);
if (request.getVersion() != SAMLVersion.VERSION_10 && !Strings.isNullOrEmpty(request.getID())) {
domElement.setIdAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, true);
}
@@ -58,7 +60,7 @@ public abstract class RequestAbstractTypeUnmarshaller extends AbstractSAMLObject
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- RequestAbstractType request = (RequestAbstractType) parentSAMLObject;
+ final RequestAbstractType request = (RequestAbstractType) parentSAMLObject;
if (childSAMLObject instanceof Signature) {
request.setSignature((Signature) childSAMLObject);
@@ -69,44 +71,49 @@ public abstract class RequestAbstractTypeUnmarshaller extends AbstractSAMLObject
}
}
- // Checkstyle: CyclomaticComplexity OFF
+// Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlElement, Attr attribute) throws UnmarshallingException {
- RequestAbstractType request = (RequestAbstractType) samlElement;
+ final RequestAbstractType request = (RequestAbstractType) samlElement;
- if (RequestAbstractType.ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
- request.setID(attribute.getValue());
- } else if (RequestAbstractType.ISSUEINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- DateTime cal = new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC());
- request.setIssueInstant(cal);
- } else if (attribute.getLocalName().equals(RequestAbstractType.MAJORVERSION_ATTRIB_NAME)) {
- int major;
- try {
- major = Integer.parseInt(attribute.getValue());
- if (major != 1) {
- throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ if (attribute.getNamespaceURI() == null) {
+ if (RequestAbstractType.ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ request.setID(attribute.getValue());
+ } else if (RequestAbstractType.ISSUEINSTANT_ATTRIB_NAME.equals(attribute.getLocalName())
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ DateTime cal = new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC());
+ request.setIssueInstant(cal);
+ } else if (attribute.getLocalName().equals(RequestAbstractType.MAJORVERSION_ATTRIB_NAME)) {
+ int major;
+ try {
+ major = Integer.parseInt(attribute.getValue());
+ if (major != 1) {
+ throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ }
+ } catch (final NumberFormatException n) {
+ log.error("Failed to parse major version string", n);
+ throw new UnmarshallingException(n);
}
- } catch (final NumberFormatException n) {
- log.error("Failed to parse major version string", n);
- throw new UnmarshallingException(n);
- }
- } else if (RequestAbstractType.MINORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
- int minor;
- try {
- minor = Integer.parseInt(attribute.getValue());
- } catch (NumberFormatException n) {
- log.error("Unable to parse minor version string", n);
- throw new UnmarshallingException(n);
- }
- if (minor == 0) {
- request.setVersion(SAMLVersion.VERSION_10);
- } else if (minor == 1) {
- request.setVersion(SAMLVersion.VERSION_11);
+ } else if (RequestAbstractType.MINORVERSION_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ int minor;
+ try {
+ minor = Integer.parseInt(attribute.getValue());
+ } catch (final NumberFormatException n) {
+ log.error("Unable to parse minor version string", n);
+ throw new UnmarshallingException(n);
+ }
+ if (minor == 0) {
+ request.setVersion(SAMLVersion.VERSION_10);
+ } else if (minor == 1) {
+ request.setVersion(SAMLVersion.VERSION_11);
+ }
+ } else {
+ super.processAttribute(samlElement, attribute);
}
} else {
super.processAttribute(samlElement, attribute);
}
+
}
// Checkstyle: CyclomaticComplexity OFF
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ResponseAbstractTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ResponseAbstractTypeUnmarshaller.java
index 1e7cd2b..1eed6a3 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ResponseAbstractTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/ResponseAbstractTypeUnmarshaller.java
@@ -21,6 +21,8 @@
package org.opensaml.saml.saml1.core.impl;
+import javax.annotation.Nonnull;
+
import org.joda.time.DateTime;
import org.joda.time.chrono.ISOChronology;
import org.opensaml.core.xml.XMLObject;
@@ -43,12 +45,12 @@ import com.google.common.base.Strings;
public abstract class ResponseAbstractTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** Logger. */
- private final Logger log = LoggerFactory.getLogger(ResponseUnmarshaller.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(ResponseUnmarshaller.class);
/** {@inheritDoc} */
public XMLObject unmarshall(Element domElement) throws UnmarshallingException {
// After regular unmarshalling, check the minor version and set ID-ness if not SAML 1.0
- ResponseAbstractType response = (ResponseAbstractType) super.unmarshall(domElement);
+ final ResponseAbstractType response = (ResponseAbstractType) super.unmarshall(domElement);
if (response.getVersion() != SAMLVersion.VERSION_10 && !Strings.isNullOrEmpty(response.getID())) {
domElement.setIdAttributeNS(null, ResponseAbstractType.ID_ATTRIB_NAME, true);
}
@@ -58,7 +60,7 @@ public abstract class ResponseAbstractTypeUnmarshaller extends AbstractSAMLObjec
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- ResponseAbstractType response = (ResponseAbstractType) parentSAMLObject;
+ final ResponseAbstractType response = (ResponseAbstractType) parentSAMLObject;
if (childSAMLObject instanceof Signature) {
response.setSignature((Signature) childSAMLObject);
@@ -70,44 +72,49 @@ public abstract class ResponseAbstractTypeUnmarshaller extends AbstractSAMLObjec
// Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- ResponseAbstractType response = (ResponseAbstractType) samlObject;
+ final ResponseAbstractType response = (ResponseAbstractType) samlObject;
- if (attribute.getLocalName().equals(ResponseAbstractType.ID_ATTRIB_NAME)) {
- response.setID(attribute.getValue());
- } else if (attribute.getLocalName().equals(ResponseAbstractType.INRESPONSETO_ATTRIB_NAME)) {
- response.setInResponseTo(attribute.getValue());
- } else if (attribute.getLocalName().equals(ResponseAbstractType.ISSUEINSTANT_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- response.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(ResponseAbstractType.MAJORVERSION_ATTRIB_NAME)) {
- int major;
- try {
- major = Integer.parseInt(attribute.getValue());
- if (major != 1) {
- throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(ResponseAbstractType.ID_ATTRIB_NAME)) {
+ response.setID(attribute.getValue());
+ } else if (attribute.getLocalName().equals(ResponseAbstractType.INRESPONSETO_ATTRIB_NAME)) {
+ response.setInResponseTo(attribute.getValue());
+ } else if (attribute.getLocalName().equals(ResponseAbstractType.ISSUEINSTANT_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ response.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(ResponseAbstractType.MAJORVERSION_ATTRIB_NAME)) {
+ int major;
+ try {
+ major = Integer.parseInt(attribute.getValue());
+ if (major != 1) {
+ throw new UnmarshallingException("MajorVersion was invalid, must be 1");
+ }
+ } catch (final NumberFormatException n) {
+ log.error("Failed to parse major version", n);
+ throw new UnmarshallingException(n);
}
- } catch (final NumberFormatException n) {
- log.error("Failed to parse major version", n);
- throw new UnmarshallingException(n);
- }
- } else if (attribute.getLocalName().equals(ResponseAbstractType.MINORVERSION_ATTRIB_NAME)) {
- int minor;
- try {
- minor = Integer.parseInt(attribute.getValue());
- } catch (NumberFormatException n) {
- log.error("Failed to parse minor version", n);
- throw new UnmarshallingException(n);
- }
- if (minor == 0) {
- response.setVersion(SAMLVersion.VERSION_10);
- } else if (minor == 1) {
- response.setVersion(SAMLVersion.VERSION_11);
+ } else if (attribute.getLocalName().equals(ResponseAbstractType.MINORVERSION_ATTRIB_NAME)) {
+ int minor;
+ try {
+ minor = Integer.parseInt(attribute.getValue());
+ } catch (final NumberFormatException n) {
+ log.error("Failed to parse minor version", n);
+ throw new UnmarshallingException(n);
+ }
+ if (minor == 0) {
+ response.setVersion(SAMLVersion.VERSION_10);
+ } else if (minor == 1) {
+ response.setVersion(SAMLVersion.VERSION_11);
+ }
+ } else if (attribute.getLocalName().equals(ResponseAbstractType.RECIPIENT_ATTRIB_NAME)) {
+ response.setRecipient(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
}
- } else if (attribute.getLocalName().equals(ResponseAbstractType.RECIPIENT_ATTRIB_NAME)) {
- response.setRecipient(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
+
}
// Checkstyle: CyclomaticComplexity ON
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/StatusCodeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/StatusCodeUnmarshaller.java
index 7ec7ead..0a8bfb9 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/StatusCodeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/StatusCodeUnmarshaller.java
@@ -34,7 +34,7 @@ public class StatusCodeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- StatusCode statusCode = (StatusCode) parentSAMLObject;
+ final StatusCode statusCode = (StatusCode) parentSAMLObject;
if (childSAMLObject instanceof StatusCode) {
statusCode.setStatusCode((StatusCode) childSAMLObject);
@@ -47,9 +47,9 @@ public class StatusCodeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- StatusCode statusCode = (StatusCode) samlObject;
+ final StatusCode statusCode = (StatusCode) samlObject;
- if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
+ if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME) && attribute.getNamespaceURI() == null) {
statusCode.setValue(AttributeSupport.getAttributeValueAsQName(attribute));
} else {
super.processAttribute(samlObject, attribute);
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/SubjectLocalityUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/SubjectLocalityUnmarshaller.java
index 04bb36c..5617567 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/SubjectLocalityUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/SubjectLocalityUnmarshaller.java
@@ -31,14 +31,19 @@ public class SubjectLocalityUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SubjectLocality subjectLocality = (SubjectLocality) samlObject;
+ final SubjectLocality subjectLocality = (SubjectLocality) samlObject;
- if (SubjectLocality.DNSADDRESS_ATTRIB_NAME.equals(attribute.getLocalName())) {
- subjectLocality.setDNSAddress(attribute.getValue());
- } else if (SubjectLocality.IPADDRESS_ATTRIB_NAME.equals(attribute.getLocalName())) {
- subjectLocality.setIPAddress(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (SubjectLocality.DNSADDRESS_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ subjectLocality.setDNSAddress(attribute.getValue());
+ } else if (SubjectLocality.IPADDRESS_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ subjectLocality.setIPAddress(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AbstractNameIDTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AbstractNameIDTypeUnmarshaller.java
index 27cc129..1f2b9a0 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AbstractNameIDTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AbstractNameIDTypeUnmarshaller.java
@@ -30,24 +30,29 @@ import org.w3c.dom.Attr;
public abstract class AbstractNameIDTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
+ protected void processElementContent(XMLObject samlObject, String elementContent) {
+ final NameIDType nameID = (NameIDType) samlObject;
+ nameID.setValue(elementContent);
+ }
+
+ /** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- NameIDType nameID = (NameIDType) samlObject;
- if (attribute.getLocalName().equals(NameID.NAME_QUALIFIER_ATTRIB_NAME)) {
- nameID.setNameQualifier(attribute.getValue());
- } else if (attribute.getLocalName().equals(NameID.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
- nameID.setSPNameQualifier(attribute.getValue());
- } else if (attribute.getLocalName().equals(NameID.FORMAT_ATTRIB_NAME)) {
- nameID.setFormat(attribute.getValue());
- } else if (attribute.getLocalName().equals(NameID.SPPROVIDED_ID_ATTRIB_NAME)) {
- nameID.setSPProvidedID(attribute.getValue());
+ final NameIDType nameID = (NameIDType) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(NameID.NAME_QUALIFIER_ATTRIB_NAME)) {
+ nameID.setNameQualifier(attribute.getValue());
+ } else if (attribute.getLocalName().equals(NameID.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
+ nameID.setSPNameQualifier(attribute.getValue());
+ } else if (attribute.getLocalName().equals(NameID.FORMAT_ATTRIB_NAME)) {
+ nameID.setFormat(attribute.getValue());
+ } else if (attribute.getLocalName().equals(NameID.SPPROVIDED_ID_ATTRIB_NAME)) {
+ nameID.setSPProvidedID(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
- NameIDType nameID = (NameIDType) samlObject;
- nameID.setValue(elementContent);
- }
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ActionUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ActionUnmarshaller.java
index 3416841..d96f3b3 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ActionUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ActionUnmarshaller.java
@@ -33,19 +33,20 @@ import org.w3c.dom.Attr;
public class ActionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
+ protected void processElementContent(XMLObject samlObject, String elementContent) {
+ final Action action = (Action) samlObject;
+ action.setAction(elementContent);
+ }
+
+ /** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Action action = (Action) samlObject;
+ final Action action = (Action) samlObject;
- if (attribute.getLocalName().equals(Action.NAMEPSACE_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(Action.NAMEPSACE_ATTRIB_NAME) && attribute.getNamespaceURI() == null) {
action.setNamespace(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
- Action action = (Action) samlObject;
- action.setAction(elementContent);
- }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionUnmarshaller.java
index 5461dc6..f573030 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionUnmarshaller.java
@@ -45,7 +45,7 @@ public class AssertionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- Assertion assertion = (Assertion) parentObject;
+ final Assertion assertion = (Assertion) parentObject;
if (childObject instanceof Issuer) {
assertion.setIssuer((Issuer) childObject);
@@ -66,18 +66,23 @@ public class AssertionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Assertion assertion = (Assertion) samlObject;
+ final Assertion assertion = (Assertion) samlObject;
- if (attribute.getLocalName().equals(Assertion.VERSION_ATTRIB_NAME)) {
- assertion.setVersion(SAMLVersion.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(Assertion.ISSUE_INSTANT_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- assertion.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(Assertion.ID_ATTRIB_NAME)) {
- assertion.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(Assertion.VERSION_ATTRIB_NAME)) {
+ assertion.setVersion(SAMLVersion.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(Assertion.ISSUE_INSTANT_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ assertion.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(Assertion.ID_ATTRIB_NAME)) {
+ assertion.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AttributeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AttributeUnmarshaller.java
index 499b667..19847d4 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AttributeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AttributeUnmarshaller.java
@@ -35,7 +35,7 @@ public class AttributeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Attribute attribute = (Attribute) parentSAMLObject;
+ final Attribute attribute = (Attribute) parentSAMLObject;
QName childQName = childSAMLObject.getElementQName();
if ("AttributeValue".equals(childQName.getLocalPart())
@@ -49,16 +49,21 @@ public class AttributeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Attribute attrib = (Attribute) samlObject;
+ final Attribute attrib = (Attribute) samlObject;
- if (attribute.getLocalName().equals(Attribute.NAME_ATTTRIB_NAME)) {
- attrib.setName(attribute.getValue());
- } else if (attribute.getLocalName().equals(Attribute.NAME_FORMAT_ATTRIB_NAME)) {
- attrib.setNameFormat(attribute.getValue());
- } else if (attribute.getLocalName().equals(Attribute.FRIENDLY_NAME_ATTRIB_NAME)) {
- attrib.setFriendlyName(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(Attribute.NAME_ATTTRIB_NAME)) {
+ attrib.setName(attribute.getValue());
+ } else if (attribute.getLocalName().equals(Attribute.NAME_FORMAT_ATTRIB_NAME)) {
+ attrib.setNameFormat(attribute.getValue());
+ } else if (attribute.getLocalName().equals(Attribute.FRIENDLY_NAME_ATTRIB_NAME)) {
+ attrib.setFriendlyName(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
processUnknownAttribute(attrib, attribute);
- }
+ }
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnQueryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnQueryUnmarshaller.java
index 2c7de2a..38d1e3f 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnQueryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnQueryUnmarshaller.java
@@ -33,25 +33,27 @@ import org.w3c.dom.Attr;
public class AuthnQueryUnmarshaller extends SubjectQueryUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthnQuery query = (AuthnQuery) samlObject;
-
- if (attribute.getLocalName().equals(AuthnQuery.SESSION_INDEX_ATTRIB_NAME)) {
- query.setSessionIndex(attribute.getValue());
+ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
+ throws UnmarshallingException {
+ final AuthnQuery query = (AuthnQuery) parentSAMLObject;
+
+ if (childSAMLObject instanceof RequestedAuthnContext) {
+ query.setRequestedAuthnContext((RequestedAuthnContext) childSAMLObject);
} else {
- super.processAttribute(samlObject, attribute);
+ super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
/** {@inheritDoc} */
- protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
- throws UnmarshallingException {
- AuthnQuery query = (AuthnQuery) parentSAMLObject;
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final AuthnQuery query = (AuthnQuery) samlObject;
- if (childSAMLObject instanceof RequestedAuthnContext) {
- query.setRequestedAuthnContext((RequestedAuthnContext) childSAMLObject);
+ if (attribute.getLocalName().equals(AuthnQuery.SESSION_INDEX_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
+ query.setSessionIndex(attribute.getValue());
} else {
- super.processChildElement(parentSAMLObject, childSAMLObject);
+ super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnRequestUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnRequestUnmarshaller.java
index c9046ea..935562c 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnRequestUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnRequestUnmarshaller.java
@@ -38,33 +38,10 @@ import org.w3c.dom.Attr;
public class AuthnRequestUnmarshaller extends RequestAbstractTypeUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthnRequest req = (AuthnRequest) samlObject;
-
- if (attribute.getLocalName().equals(AuthnRequest.FORCE_AUTHN_ATTRIB_NAME)) {
- req.setForceAuthn(XSBooleanValue.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(AuthnRequest.IS_PASSIVE_ATTRIB_NAME)) {
- req.setIsPassive(XSBooleanValue.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(AuthnRequest.PROTOCOL_BINDING_ATTRIB_NAME)) {
- req.setProtocolBinding(attribute.getValue());
- } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_INDEX_ATTRIB_NAME)) {
- req.setAssertionConsumerServiceIndex(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME)) {
- req.setAssertionConsumerServiceURL(attribute.getValue());
- } else if (attribute.getLocalName().equals(AuthnRequest.ATTRIBUTE_CONSUMING_SERVICE_INDEX_ATTRIB_NAME)) {
- req.setAttributeConsumingServiceIndex(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(AuthnRequest.PROVIDER_NAME_ATTRIB_NAME)) {
- req.setProviderName(attribute.getValue());
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AuthnRequest req = (AuthnRequest) parentSAMLObject;
-
+ final AuthnRequest req = (AuthnRequest) parentSAMLObject;
+
if (childSAMLObject instanceof Subject) {
req.setSubject((Subject) childSAMLObject);
} else if (childSAMLObject instanceof NameIDPolicy) {
@@ -79,4 +56,32 @@ public class AuthnRequestUnmarshaller extends RequestAbstractTypeUnmarshaller {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final AuthnRequest req = (AuthnRequest) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(AuthnRequest.FORCE_AUTHN_ATTRIB_NAME)) {
+ req.setForceAuthn(XSBooleanValue.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(AuthnRequest.IS_PASSIVE_ATTRIB_NAME)) {
+ req.setIsPassive(XSBooleanValue.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(AuthnRequest.PROTOCOL_BINDING_ATTRIB_NAME)) {
+ req.setProtocolBinding(attribute.getValue());
+ } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_INDEX_ATTRIB_NAME)) {
+ req.setAssertionConsumerServiceIndex(Integer.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME)) {
+ req.setAssertionConsumerServiceURL(attribute.getValue());
+ } else if (attribute.getLocalName().equals(AuthnRequest.ATTRIBUTE_CONSUMING_SERVICE_INDEX_ATTRIB_NAME)) {
+ req.setAttributeConsumingServiceIndex(Integer.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(AuthnRequest.PROVIDER_NAME_ATTRIB_NAME)) {
+ req.setProviderName(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnStatementUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnStatementUnmarshaller.java
index 6f2389d..32ec2ec 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnStatementUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthnStatementUnmarshaller.java
@@ -40,7 +40,7 @@ public class AuthnStatementUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- AuthnStatement authnStatement = (AuthnStatement) parentObject;
+ final AuthnStatement authnStatement = (AuthnStatement) parentObject;
if (childObject instanceof SubjectLocality) {
authnStatement.setSubjectLocality((SubjectLocality) childObject);
} else if (childObject instanceof AuthnContext) {
@@ -52,17 +52,24 @@ public class AuthnStatementUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthnStatement authnStatement = (AuthnStatement) samlObject;
- if (attribute.getLocalName().equals(AuthnStatement.AUTHN_INSTANT_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- authnStatement.setAuthnInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_INDEX_ATTRIB_NAME)) {
- authnStatement.setSessionIndex(attribute.getValue());
- } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- authnStatement.setSessionNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ final AuthnStatement authnStatement = (AuthnStatement) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(AuthnStatement.AUTHN_INSTANT_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ authnStatement.setAuthnInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_INDEX_ATTRIB_NAME)) {
+ authnStatement.setSessionIndex(attribute.getValue());
+ } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ authnStatement.setSessionNotOnOrAfter(new DateTime(attribute.getValue(),
+ ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionQueryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionQueryUnmarshaller.java
index 19e416a..fc53cee 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionQueryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionQueryUnmarshaller.java
@@ -34,21 +34,10 @@ import org.w3c.dom.Attr;
public class AuthzDecisionQueryUnmarshaller extends SubjectQueryUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthzDecisionQuery query = (AuthzDecisionQuery) samlObject;
-
- if (attribute.getLocalName().equals(AuthzDecisionQuery.RESOURCE_ATTRIB_NAME)) {
- query.setResource(attribute.getValue());
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AuthzDecisionQuery query = (AuthzDecisionQuery) parentSAMLObject;
-
+ final AuthzDecisionQuery query = (AuthzDecisionQuery) parentSAMLObject;
+
if (childSAMLObject instanceof Action) {
query.getActions().add((Action) childSAMLObject);
} else if (childSAMLObject instanceof Evidence) {
@@ -57,4 +46,17 @@ public class AuthzDecisionQueryUnmarshaller extends SubjectQueryUnmarshaller {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final AuthzDecisionQuery query = (AuthzDecisionQuery) samlObject;
+
+ if (attribute.getLocalName().equals(AuthzDecisionQuery.RESOURCE_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
+ query.setResource(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionStatementUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionStatementUnmarshaller.java
index ac352da..5f91bb0 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionStatementUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AuthzDecisionStatementUnmarshaller.java
@@ -37,7 +37,7 @@ public class AuthzDecisionStatementUnmarshaller extends AbstractSAMLObjectUnmars
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- AuthzDecisionStatement authzDS = (AuthzDecisionStatement) parentObject;
+ final AuthzDecisionStatement authzDS = (AuthzDecisionStatement) parentObject;
if (childObject instanceof Action) {
authzDS.getActions().add((Action) childObject);
@@ -50,23 +50,28 @@ public class AuthzDecisionStatementUnmarshaller extends AbstractSAMLObjectUnmars
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AuthzDecisionStatement authzDS = (AuthzDecisionStatement) samlObject;
+ final AuthzDecisionStatement authzDS = (AuthzDecisionStatement) samlObject;
- if (attribute.getLocalName().equals(AuthzDecisionStatement.RESOURCE_ATTRIB_NAME)) {
- authzDS.setResource(attribute.getValue());
- } else if (attribute.getLocalName().equals(AuthzDecisionStatement.DECISION_ATTRIB_NAME)) {
- String value = attribute.getValue();
- if (value.equals(DecisionTypeEnumeration.PERMIT.toString())) {
- authzDS.setDecision(DecisionTypeEnumeration.PERMIT);
- } else if (value.equals(DecisionTypeEnumeration.DENY.toString())) {
- authzDS.setDecision(DecisionTypeEnumeration.DENY);
- } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
- authzDS.setDecision(DecisionTypeEnumeration.INDETERMINATE);
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(AuthzDecisionStatement.RESOURCE_ATTRIB_NAME)) {
+ authzDS.setResource(attribute.getValue());
+ } else if (attribute.getLocalName().equals(AuthzDecisionStatement.DECISION_ATTRIB_NAME)) {
+ final String value = attribute.getValue();
+ if (value.equals(DecisionTypeEnumeration.PERMIT.toString())) {
+ authzDS.setDecision(DecisionTypeEnumeration.PERMIT);
+ } else if (value.equals(DecisionTypeEnumeration.DENY.toString())) {
+ authzDS.setDecision(DecisionTypeEnumeration.DENY);
+ } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
+ authzDS.setDecision(DecisionTypeEnumeration.INDETERMINATE);
+ } else {
+ throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
+ }
} else {
- throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
+ super.processAttribute(samlObject, attribute);
}
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/BaseIDUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/BaseIDUnmarshaller.java
index d51f3f7..2a169b0 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/BaseIDUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/BaseIDUnmarshaller.java
@@ -34,13 +34,19 @@ public abstract class BaseIDUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- BaseID baseID = (BaseID) samlObject;
- if (attribute.getLocalName().equals(BaseID.NAME_QUALIFIER_ATTRIB_NAME)) {
- baseID.setNameQualifier(attribute.getValue());
- } else if (attribute.getLocalName().equals(BaseID.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
- baseID.setSPNameQualifier(attribute.getValue());
+ final BaseID baseID = (BaseID) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(BaseID.NAME_QUALIFIER_ATTRIB_NAME)) {
+ baseID.setNameQualifier(attribute.getValue());
+ } else if (attribute.getLocalName().equals(BaseID.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
+ baseID.setSPNameQualifier(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ConditionsUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ConditionsUnmarshaller.java
index a28690a..72f19c0 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ConditionsUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ConditionsUnmarshaller.java
@@ -39,7 +39,7 @@ public class ConditionsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- Conditions conditions = (Conditions) parentObject;
+ final Conditions conditions = (Conditions) parentObject;
if (childObject instanceof Condition) {
conditions.getConditions().add((Condition) childObject);
@@ -50,16 +50,21 @@ public class ConditionsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Conditions conditions = (Conditions) samlObject;
+ final Conditions conditions = (Conditions) samlObject;
- if (attribute.getLocalName().equals(Conditions.NOT_BEFORE_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- conditions.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(Conditions.NOT_ON_OR_AFTER_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- conditions.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(Conditions.NOT_BEFORE_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ conditions.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(Conditions.NOT_ON_OR_AFTER_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ conditions.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/IDPEntryUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/IDPEntryUnmarshaller.java
index d34fb4c..c7e9f21 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/IDPEntryUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/IDPEntryUnmarshaller.java
@@ -34,16 +34,21 @@ public class IDPEntryUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- IDPEntry entry = (IDPEntry) samlObject;
+ final IDPEntry entry = (IDPEntry) samlObject;
- if (attribute.getLocalName().equals(IDPEntry.PROVIDER_ID_ATTRIB_NAME)) {
- entry.setProviderID(attribute.getValue());
- } else if (attribute.getLocalName().equals(IDPEntry.NAME_ATTRIB_NAME)) {
- entry.setName(attribute.getValue());
- } else if (attribute.getLocalName().equals(IDPEntry.LOC_ATTRIB_NAME)) {
- entry.setLoc(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(IDPEntry.PROVIDER_ID_ATTRIB_NAME)) {
+ entry.setProviderID(attribute.getValue());
+ } else if (attribute.getLocalName().equals(IDPEntry.NAME_ATTRIB_NAME)) {
+ entry.setName(attribute.getValue());
+ } else if (attribute.getLocalName().equals(IDPEntry.LOC_ATTRIB_NAME)) {
+ entry.setLoc(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/LogoutRequestUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/LogoutRequestUnmarshaller.java
index 8d860ae..434c4d6 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/LogoutRequestUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/LogoutRequestUnmarshaller.java
@@ -36,24 +36,10 @@ import com.google.common.base.Strings;
public class LogoutRequestUnmarshaller extends RequestAbstractTypeUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- LogoutRequest req = (LogoutRequest) samlObject;
-
- if (attribute.getLocalName().equals(LogoutRequest.REASON_ATTRIB_NAME)) {
- req.setReason(attribute.getValue());
- } else if (attribute.getLocalName().equals(LogoutRequest.NOT_ON_OR_AFTER_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- req.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- LogoutRequest req = (LogoutRequest) parentSAMLObject;
-
+ final LogoutRequest req = (LogoutRequest) parentSAMLObject;
+
if (childSAMLObject instanceof BaseID) {
req.setBaseID((BaseID) childSAMLObject);
} else if (childSAMLObject instanceof NameID) {
@@ -66,4 +52,23 @@ public class LogoutRequestUnmarshaller extends RequestAbstractTypeUnmarshaller {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final LogoutRequest req = (LogoutRequest) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(LogoutRequest.REASON_ATTRIB_NAME)) {
+ req.setReason(attribute.getValue());
+ } else if (attribute.getLocalName().equals(LogoutRequest.NOT_ON_OR_AFTER_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ req.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
index 3dec981..a0279a6 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
@@ -35,18 +35,23 @@ public class NameIDPolicyUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- NameIDPolicy policy = (NameIDPolicy) samlObject;
+ final NameIDPolicy policy = (NameIDPolicy) samlObject;
- if (attribute.getLocalName().equals(NameIDPolicy.FORMAT_ATTRIB_NAME)) {
- policy.setFormat(attribute.getValue());
- }
- if (attribute.getLocalName().equals(NameIDPolicy.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
- policy.setSPNameQualifier(attribute.getValue());
- }
- if (attribute.getLocalName().equals(NameIDPolicy.ALLOW_CREATE_ATTRIB_NAME)) {
- policy.setAllowCreate(XSBooleanValue.valueOf(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(NameIDPolicy.FORMAT_ATTRIB_NAME)) {
+ policy.setFormat(attribute.getValue());
+ }
+ if (attribute.getLocalName().equals(NameIDPolicy.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
+ policy.setSPNameQualifier(attribute.getValue());
+ }
+ if (attribute.getLocalName().equals(NameIDPolicy.ALLOW_CREATE_ATTRIB_NAME)) {
+ policy.setAllowCreate(XSBooleanValue.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ProxyRestrictionUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ProxyRestrictionUnmarshaller.java
index 0f3e8ec..dd4f31d 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ProxyRestrictionUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ProxyRestrictionUnmarshaller.java
@@ -35,7 +35,7 @@ public class ProxyRestrictionUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- ProxyRestriction proxyRestriction = (ProxyRestriction) parentObject;
+ final ProxyRestriction proxyRestriction = (ProxyRestriction) parentObject;
if (childObject instanceof Audience) {
proxyRestriction.getAudiences().add((Audience) childObject);
@@ -46,12 +46,14 @@ public class ProxyRestrictionUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- ProxyRestriction proxyRestriction = (ProxyRestriction) samlObject;
+ final ProxyRestriction proxyRestriction = (ProxyRestriction) samlObject;
- if (attribute.getLocalName().equals(ProxyRestriction.COUNT_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(ProxyRestriction.COUNT_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
proxyRestriction.setProxyCount(Integer.valueOf(attribute.getValue()));
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestAbstractTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestAbstractTypeUnmarshaller.java
index 432f89f..e07cb48 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestAbstractTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestAbstractTypeUnmarshaller.java
@@ -41,31 +41,10 @@ import com.google.common.base.Strings;
public abstract class RequestAbstractTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- RequestAbstractType req = (RequestAbstractType) samlObject;
-
- if (attribute.getLocalName().equals(RequestAbstractType.VERSION_ATTRIB_NAME)) {
- req.setVersion(SAMLVersion.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(RequestAbstractType.ID_ATTRIB_NAME)) {
- req.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- req.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(RequestAbstractType.DESTINATION_ATTRIB_NAME)) {
- req.setDestination(attribute.getValue());
- } else if (attribute.getLocalName().equals(RequestAbstractType.CONSENT_ATTRIB_NAME)) {
- req.setConsent(attribute.getValue());
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- RequestAbstractType req = (RequestAbstractType) parentSAMLObject;
-
+ final RequestAbstractType req = (RequestAbstractType) parentSAMLObject;
+
if (childSAMLObject instanceof Issuer) {
req.setIssuer((Issuer) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
@@ -76,4 +55,30 @@ public abstract class RequestAbstractTypeUnmarshaller extends AbstractSAMLObject
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final RequestAbstractType req = (RequestAbstractType) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(RequestAbstractType.VERSION_ATTRIB_NAME)) {
+ req.setVersion(SAMLVersion.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(RequestAbstractType.ID_ATTRIB_NAME)) {
+ req.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ req.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(RequestAbstractType.DESTINATION_ATTRIB_NAME)) {
+ req.setDestination(attribute.getValue());
+ } else if (attribute.getLocalName().equals(RequestAbstractType.CONSENT_ATTRIB_NAME)) {
+ req.setConsent(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestedAuthnContextUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestedAuthnContextUnmarshaller.java
index a6361ee..4b8d586 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestedAuthnContextUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/RequestedAuthnContextUnmarshaller.java
@@ -36,10 +36,25 @@ import org.w3c.dom.Attr;
public class RequestedAuthnContextUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
+ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
+ throws UnmarshallingException {
+ final RequestedAuthnContext rac = (RequestedAuthnContext) parentSAMLObject;
+
+ if (childSAMLObject instanceof AuthnContextClassRef) {
+ rac.getAuthnContextClassRefs().add((AuthnContextClassRef) childSAMLObject);
+ } else if (childSAMLObject instanceof AuthnContextDeclRef) {
+ rac.getAuthnContextDeclRefs().add((AuthnContextDeclRef) childSAMLObject);
+ } else {
+ super.processChildElement(parentSAMLObject, childSAMLObject);
+ }
+ }
+
+ /** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- RequestedAuthnContext rac = (RequestedAuthnContext) samlObject;
+ final RequestedAuthnContext rac = (RequestedAuthnContext) samlObject;
- if (attribute.getLocalName().equals(RequestedAuthnContext.COMPARISON_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(RequestedAuthnContext.COMPARISON_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
if ("exact".equals(attribute.getValue())) {
rac.setComparison(AuthnContextComparisonTypeEnumeration.EXACT);
} else if ("minimum".equals(attribute.getValue())) {
@@ -56,17 +71,4 @@ public class RequestedAuthnContextUnmarshaller extends AbstractSAMLObjectUnmarsh
super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
- throws UnmarshallingException {
- RequestedAuthnContext rac = (RequestedAuthnContext) parentSAMLObject;
- if (childSAMLObject instanceof AuthnContextClassRef) {
- rac.getAuthnContextClassRefs().add((AuthnContextClassRef) childSAMLObject);
- } else if (childSAMLObject instanceof AuthnContextDeclRef) {
- rac.getAuthnContextDeclRefs().add((AuthnContextDeclRef) childSAMLObject);
- } else {
- super.processChildElement(parentSAMLObject, childSAMLObject);
- }
- }
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ScopingUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ScopingUnmarshaller.java
index f13bdac..dc6b897 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ScopingUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/ScopingUnmarshaller.java
@@ -35,20 +35,10 @@ import org.w3c.dom.Attr;
public class ScopingUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Scoping scoping = (Scoping) samlObject;
-
- if (attribute.getLocalName().equals(Scoping.PROXY_COUNT_ATTRIB_NAME)) {
- scoping.setProxyCount(Integer.valueOf(attribute.getValue()));
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Scoping scoping = (Scoping) parentSAMLObject;
+ final Scoping scoping = (Scoping) parentSAMLObject;
+
if (childSAMLObject instanceof IDPList) {
scoping.setIDPList((IDPList) childSAMLObject);
} else if (childSAMLObject instanceof RequesterID) {
@@ -57,4 +47,16 @@ public class ScopingUnmarshaller extends AbstractSAMLObjectUnmarshaller {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final Scoping scoping = (Scoping) samlObject;
+
+ if (attribute.getLocalName().equals(Scoping.PROXY_COUNT_ATTRIB_NAME) && attribute.getNamespaceURI() == null) {
+ scoping.setProxyCount(Integer.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusCodeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusCodeUnmarshaller.java
index 0e2359e..0b75c59 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusCodeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusCodeUnmarshaller.java
@@ -33,25 +33,26 @@ import org.w3c.dom.Attr;
public class StatusCodeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- StatusCode statusCode = (StatusCode) samlObject;
-
- if (attribute.getLocalName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
- statusCode.setValue(attribute.getValue());
+ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
+ throws UnmarshallingException {
+ final StatusCode statusCode = (StatusCode) parentSAMLObject;
+
+ if (childSAMLObject instanceof StatusCode) {
+ statusCode.setStatusCode((StatusCode) childSAMLObject);
} else {
- super.processAttribute(samlObject, attribute);
+ super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
/** {@inheritDoc} */
- protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
- throws UnmarshallingException {
- StatusCode statusCode = (StatusCode) parentSAMLObject;
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final StatusCode statusCode = (StatusCode) samlObject;
- if (childSAMLObject instanceof StatusCode) {
- statusCode.setStatusCode((StatusCode) childSAMLObject);
+ if (attribute.getLocalName().equals(StatusCode.VALUE_ATTRIB_NAME) && attribute.getNamespaceURI() == null) {
+ statusCode.setValue(attribute.getValue());
} else {
- super.processChildElement(parentSAMLObject, childSAMLObject);
+ super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusResponseTypeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusResponseTypeUnmarshaller.java
index e734b58..8ee5695 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusResponseTypeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/StatusResponseTypeUnmarshaller.java
@@ -42,33 +42,10 @@ import com.google.common.base.Strings;
public abstract class StatusResponseTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
- protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- StatusResponseType sr = (StatusResponseType) samlObject;
-
- if (attribute.getLocalName().equals(StatusResponseType.VERSION_ATTRIB_NAME)) {
- sr.setVersion(SAMLVersion.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(StatusResponseType.ID_ATTRIB_NAME)) {
- sr.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(StatusResponseType.IN_RESPONSE_TO_ATTRIB_NAME)) {
- sr.setInResponseTo(attribute.getValue());
- } else if (attribute.getLocalName().equals(StatusResponseType.ISSUE_INSTANT_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- sr.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(StatusResponseType.DESTINATION_ATTRIB_NAME)) {
- sr.setDestination(attribute.getValue());
- } else if (attribute.getLocalName().equals(StatusResponseType.CONSENT_ATTRIB_NAME)) {
- sr.setConsent(attribute.getValue());
- } else {
- super.processAttribute(samlObject, attribute);
- }
- }
-
- /** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- StatusResponseType sr = (StatusResponseType) parentSAMLObject;
-
+ final StatusResponseType sr = (StatusResponseType) parentSAMLObject;
+
if (childSAMLObject instanceof Issuer) {
sr.setIssuer((Issuer) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
@@ -81,4 +58,32 @@ public abstract class StatusResponseTypeUnmarshaller extends AbstractSAMLObjectU
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
+
+ /** {@inheritDoc} */
+ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
+ final StatusResponseType sr = (StatusResponseType) samlObject;
+
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(StatusResponseType.VERSION_ATTRIB_NAME)) {
+ sr.setVersion(SAMLVersion.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(StatusResponseType.ID_ATTRIB_NAME)) {
+ sr.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(StatusResponseType.IN_RESPONSE_TO_ATTRIB_NAME)) {
+ sr.setInResponseTo(attribute.getValue());
+ } else if (attribute.getLocalName().equals(StatusResponseType.ISSUE_INSTANT_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ sr.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(StatusResponseType.DESTINATION_ATTRIB_NAME)) {
+ sr.setDestination(attribute.getValue());
+ } else if (attribute.getLocalName().equals(StatusResponseType.CONSENT_ATTRIB_NAME)) {
+ sr.setConsent(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationDataUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationDataUnmarshaller.java
index 4c0605d..b70919b 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationDataUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationDataUnmarshaller.java
@@ -41,27 +41,31 @@ public class SubjectConfirmationDataUnmarshaller extends AbstractSAMLObjectUnmar
*/
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- SubjectConfirmationData subjectCD = (SubjectConfirmationData) parentSAMLObject;
+ final SubjectConfirmationData subjectCD = (SubjectConfirmationData) parentSAMLObject;
subjectCD.getUnknownXMLObjects().add(childSAMLObject);
}
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SubjectConfirmationData subjectCD = (SubjectConfirmationData) samlObject;
+ final SubjectConfirmationData subjectCD = (SubjectConfirmationData) samlObject;
- if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- subjectCD.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- subjectCD.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(SubjectConfirmationData.RECIPIENT_ATTRIB_NAME)) {
- subjectCD.setRecipient(attribute.getValue());
- } else if (attribute.getLocalName().equals(SubjectConfirmationData.IN_RESPONSE_TO_ATTRIB_NAME)) {
- subjectCD.setInResponseTo(attribute.getValue());
- } else if (attribute.getLocalName().equals(SubjectConfirmationData.ADDRESS_ATTRIB_NAME)) {
- subjectCD.setAddress(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ subjectCD.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ subjectCD.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(SubjectConfirmationData.RECIPIENT_ATTRIB_NAME)) {
+ subjectCD.setRecipient(attribute.getValue());
+ } else if (attribute.getLocalName().equals(SubjectConfirmationData.IN_RESPONSE_TO_ATTRIB_NAME)) {
+ subjectCD.setInResponseTo(attribute.getValue());
+ } else if (attribute.getLocalName().equals(SubjectConfirmationData.ADDRESS_ATTRIB_NAME)) {
+ subjectCD.setAddress(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
processUnknownAttribute(subjectCD, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationUnmarshaller.java
index 3df61bf..e546889 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectConfirmationUnmarshaller.java
@@ -34,7 +34,7 @@ public class SubjectConfirmationUnmarshaller extends AbstractSAMLObjectUnmarshal
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- SubjectConfirmation subjectConfirmation = (SubjectConfirmation) parentObject;
+ final SubjectConfirmation subjectConfirmation = (SubjectConfirmation) parentObject;
if (childObject instanceof BaseID) {
subjectConfirmation.setBaseID((BaseID) childObject);
@@ -51,12 +51,14 @@ public class SubjectConfirmationUnmarshaller extends AbstractSAMLObjectUnmarshal
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SubjectConfirmation subjectConfirmation = (SubjectConfirmation) samlObject;
+ final SubjectConfirmation subjectConfirmation = (SubjectConfirmation) samlObject;
- if (attribute.getLocalName().equals(SubjectConfirmation.METHOD_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(SubjectConfirmation.METHOD_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
subjectConfirmation.setMethod(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectLocalityUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectLocalityUnmarshaller.java
index 99d6ca7..c0d1066 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectLocalityUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/SubjectLocalityUnmarshaller.java
@@ -34,14 +34,19 @@ public class SubjectLocalityUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SubjectLocality subjectLocality = (SubjectLocality) samlObject;
+ final SubjectLocality subjectLocality = (SubjectLocality) samlObject;
- if (attribute.getLocalName().equals(SubjectLocality.ADDRESS_ATTRIB_NAME)) {
- subjectLocality.setAddress(attribute.getValue());
- } else if (attribute.getLocalName().equals(SubjectLocality.DNS_NAME_ATTRIB_NAME)) {
- subjectLocality.setDNSName(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(SubjectLocality.ADDRESS_ATTRIB_NAME)) {
+ subjectLocality.setAddress(attribute.getValue());
+ } else if (attribute.getLocalName().equals(SubjectLocality.DNS_NAME_ATTRIB_NAME)) {
+ subjectLocality.setDNSName(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AdditionalMetadataLocationUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AdditionalMetadataLocationUnmarshaller.java
index 2f04121..28091ee 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AdditionalMetadataLocationUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AdditionalMetadataLocationUnmarshaller.java
@@ -30,8 +30,10 @@ public class AdditionalMetadataLocationUnmarshaller extends AbstractSAMLObjectUn
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- if (attribute.getLocalName().equals(AdditionalMetadataLocation.NAMESPACE_ATTRIB_NAME)) {
- AdditionalMetadataLocation aml = (AdditionalMetadataLocation) samlObject;
+ final AdditionalMetadataLocation aml = (AdditionalMetadataLocation) samlObject;
+
+ if (attribute.getLocalName().equals(AdditionalMetadataLocation.NAMESPACE_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
aml.setNamespaceURI(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
@@ -40,7 +42,8 @@ public class AdditionalMetadataLocationUnmarshaller extends AbstractSAMLObjectUn
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
- AdditionalMetadataLocation aml = (AdditionalMetadataLocation) samlObject;
+ final AdditionalMetadataLocation aml = (AdditionalMetadataLocation) samlObject;
aml.setLocationURI(elementContent);
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnmarshaller.java
index 369786d..06fd1a9 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnmarshaller.java
@@ -43,7 +43,7 @@ public class AffiliationDescriptorUnmarshaller extends AbstractSAMLObjectUnmarsh
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AffiliationDescriptor descriptor = (AffiliationDescriptor) parentSAMLObject;
+ final AffiliationDescriptor descriptor = (AffiliationDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
descriptor.setExtensions((Extensions) childSAMLObject);
@@ -60,20 +60,25 @@ public class AffiliationDescriptorUnmarshaller extends AbstractSAMLObjectUnmarsh
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AffiliationDescriptor descriptor = (AffiliationDescriptor) samlObject;
+ final AffiliationDescriptor descriptor = (AffiliationDescriptor) samlObject;
- if (attribute.getLocalName().equals(AffiliationDescriptor.OWNER_ID_ATTRIB_NAME)) {
- descriptor.setOwnerID(attribute.getValue());
- } else if (attribute.getLocalName().equals(AffiliationDescriptor.ID_ATTRIB_NAME)) {
- descriptor.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- descriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
- descriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(AffiliationDescriptor.OWNER_ID_ATTRIB_NAME)) {
+ descriptor.setOwnerID(attribute.getValue());
+ } else if (attribute.getLocalName().equals(AffiliationDescriptor.ID_ATTRIB_NAME)) {
+ descriptor.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ descriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
+ descriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
processUnknownAttribute(descriptor, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AttributeConsumingServiceUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AttributeConsumingServiceUnmarshaller.java
index bb2812d..5c0e6e9 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AttributeConsumingServiceUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/AttributeConsumingServiceUnmarshaller.java
@@ -39,7 +39,7 @@ public class AttributeConsumingServiceUnmarshaller extends AbstractSAMLObjectUnm
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- AttributeConsumingService service = (AttributeConsumingService) parentSAMLObject;
+ final AttributeConsumingService service = (AttributeConsumingService) parentSAMLObject;
if (childSAMLObject instanceof ServiceName) {
service.getNames().add((ServiceName) childSAMLObject);
@@ -54,12 +54,16 @@ public class AttributeConsumingServiceUnmarshaller extends AbstractSAMLObjectUnm
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- AttributeConsumingService service = (AttributeConsumingService) samlObject;
+ final AttributeConsumingService service = (AttributeConsumingService) samlObject;
- if (attribute.getLocalName().equals(AttributeConsumingService.INDEX_ATTRIB_NAME)) {
- service.setIndex(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME)) {
- service.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(AttributeConsumingService.INDEX_ATTRIB_NAME)) {
+ service.setIndex(Integer.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME)) {
+ service.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnmarshaller.java
index 701b7a7..24805a4 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnmarshaller.java
@@ -65,18 +65,21 @@ public class ContactPersonUnmarshaller extends AbstractSAMLObjectUnmarshaller {
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
ContactPerson person = (ContactPerson) samlObject;
- if (attribute.getLocalName().equals(ContactPerson.CONTACT_TYPE_ATTRIB_NAME) &&
- attribute.getNamespaceURI() == null) {
- if (ContactPersonTypeEnumeration.TECHNICAL.toString().equals(attribute.getValue())) {
- person.setType(ContactPersonTypeEnumeration.TECHNICAL);
- } else if (ContactPersonTypeEnumeration.SUPPORT.toString().equals(attribute.getValue())) {
- person.setType(ContactPersonTypeEnumeration.SUPPORT);
- } else if (ContactPersonTypeEnumeration.ADMINISTRATIVE.toString().equals(attribute.getValue())) {
- person.setType(ContactPersonTypeEnumeration.ADMINISTRATIVE);
- } else if (ContactPersonTypeEnumeration.BILLING.toString().equals(attribute.getValue())) {
- person.setType(ContactPersonTypeEnumeration.BILLING);
- } else if (ContactPersonTypeEnumeration.OTHER.toString().equals(attribute.getValue())) {
- person.setType(ContactPersonTypeEnumeration.OTHER);
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(ContactPerson.CONTACT_TYPE_ATTRIB_NAME)) {
+ if (ContactPersonTypeEnumeration.TECHNICAL.toString().equals(attribute.getValue())) {
+ person.setType(ContactPersonTypeEnumeration.TECHNICAL);
+ } else if (ContactPersonTypeEnumeration.SUPPORT.toString().equals(attribute.getValue())) {
+ person.setType(ContactPersonTypeEnumeration.SUPPORT);
+ } else if (ContactPersonTypeEnumeration.ADMINISTRATIVE.toString().equals(attribute.getValue())) {
+ person.setType(ContactPersonTypeEnumeration.ADMINISTRATIVE);
+ } else if (ContactPersonTypeEnumeration.BILLING.toString().equals(attribute.getValue())) {
+ person.setType(ContactPersonTypeEnumeration.BILLING);
+ } else if (ContactPersonTypeEnumeration.OTHER.toString().equals(attribute.getValue())) {
+ person.setType(ContactPersonTypeEnumeration.OTHER);
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EndpointUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EndpointUnmarshaller.java
index 8730c51..65d4d6c 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EndpointUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EndpointUnmarshaller.java
@@ -30,14 +30,18 @@ public class EndpointUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Endpoint endpoint = (Endpoint) samlObject;
+ final Endpoint endpoint = (Endpoint) samlObject;
- if (attribute.getLocalName().equals(Endpoint.BINDING_ATTRIB_NAME)) {
- endpoint.setBinding(attribute.getValue());
- } else if (attribute.getLocalName().equals(Endpoint.LOCATION_ATTRIB_NAME)) {
- endpoint.setLocation(attribute.getValue());
- } else if (attribute.getLocalName().equals(Endpoint.RESPONSE_LOCATION_ATTRIB_NAME)) {
- endpoint.setResponseLocation(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(Endpoint.BINDING_ATTRIB_NAME)) {
+ endpoint.setBinding(attribute.getValue());
+ } else if (attribute.getLocalName().equals(Endpoint.LOCATION_ATTRIB_NAME)) {
+ endpoint.setLocation(attribute.getValue());
+ } else if (attribute.getLocalName().equals(Endpoint.RESPONSE_LOCATION_ATTRIB_NAME)) {
+ endpoint.setResponseLocation(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
processUnknownAttribute(endpoint, attribute);
}
@@ -48,7 +52,7 @@ public class EndpointUnmarshaller extends AbstractSAMLObjectUnmarshaller {
*/
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Endpoint endpoint = (Endpoint) parentSAMLObject;
+ final Endpoint endpoint = (Endpoint) parentSAMLObject;
endpoint.getUnknownXMLObjects().add(childSAMLObject);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntitiesDescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntitiesDescriptorUnmarshaller.java
index 41472b8..87a99f5 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntitiesDescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntitiesDescriptorUnmarshaller.java
@@ -42,7 +42,7 @@ public class EntitiesDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshall
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) parentSAMLObject;
+ final EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entitiesDescriptor.setExtensions((Extensions) childSAMLObject);
@@ -59,20 +59,25 @@ public class EntitiesDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshall
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) samlObject;
+ final EntitiesDescriptor entitiesDescriptor = (EntitiesDescriptor) samlObject;
- if (attribute.getLocalName().equals(EntitiesDescriptor.ID_ATTRIB_NAME)) {
- entitiesDescriptor.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- entitiesDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
- entitiesDescriptor.setCacheDuration(new Long(DOMTypeSupport.durationToLong(attribute.getValue())));
- } else if (attribute.getLocalName().equals(EntitiesDescriptor.NAME_ATTRIB_NAME)) {
- entitiesDescriptor.setName(attribute.getValue());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(EntitiesDescriptor.ID_ATTRIB_NAME)) {
+ entitiesDescriptor.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ entitiesDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
+ entitiesDescriptor.setCacheDuration(new Long(DOMTypeSupport.durationToLong(attribute.getValue())));
+ } else if (attribute.getLocalName().equals(EntitiesDescriptor.NAME_ATTRIB_NAME)) {
+ entitiesDescriptor.setName(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnmarshaller.java
index 6d54243..f343e6c 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnmarshaller.java
@@ -46,7 +46,7 @@ public class EntityDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject;
+ final EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entityDescriptor.setExtensions((Extensions) childSAMLObject);
@@ -69,18 +69,22 @@ public class EntityDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshaller
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- EntityDescriptor entityDescriptor = (EntityDescriptor) samlObject;
+ final EntityDescriptor entityDescriptor = (EntityDescriptor) samlObject;
- if (attribute.getLocalName().equals(EntityDescriptor.ENTITY_ID_ATTRIB_NAME)) {
- entityDescriptor.setEntityID(attribute.getValue());
- } else if (attribute.getLocalName().equals(EntityDescriptor.ID_ATTRIB_NAME)) {
- entityDescriptor.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- entityDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
- entityDescriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(EntityDescriptor.ENTITY_ID_ATTRIB_NAME)) {
+ entityDescriptor.setEntityID(attribute.getValue());
+ } else if (attribute.getLocalName().equals(EntityDescriptor.ID_ATTRIB_NAME)) {
+ entityDescriptor.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ entityDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
+ entityDescriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
processUnknownAttribute(entityDescriptor, attribute);
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnmarshaller.java
index 7a2ec16..8ba5d62 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnmarshaller.java
@@ -39,7 +39,7 @@ public class IDPSSODescriptorUnmarshaller extends SSODescriptorUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
- IDPSSODescriptor descriptor = (IDPSSODescriptor) parentObject;
+ final IDPSSODescriptor descriptor = (IDPSSODescriptor) parentObject;
if (childObject instanceof SingleSignOnService) {
descriptor.getSingleSignOnServices().add((SingleSignOnService) childObject);
@@ -58,12 +58,14 @@ public class IDPSSODescriptorUnmarshaller extends SSODescriptorUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- IDPSSODescriptor descriptor = (IDPSSODescriptor) samlObject;
+ final IDPSSODescriptor descriptor = (IDPSSODescriptor) samlObject;
- if (attribute.getLocalName().equals(IDPSSODescriptor.WANT_AUTHN_REQ_SIGNED_ATTRIB_NAME)) {
+ if (attribute.getLocalName().equals(IDPSSODescriptor.WANT_AUTHN_REQ_SIGNED_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
descriptor.setWantAuthnRequestsSigned(XSBooleanValue.valueOf(attribute.getValue()));
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IndexedEndpointUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IndexedEndpointUnmarshaller.java
index 5a801d2..b5f764b 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IndexedEndpointUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/IndexedEndpointUnmarshaller.java
@@ -34,14 +34,19 @@ public class IndexedEndpointUnmarshaller extends EndpointUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;
+ final IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;
- if (attribute.getLocalName().equals(IndexedEndpoint.INDEX_ATTRIB_NAME)) {
- iEndpoint.setIndex(Integer.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME)) {
- iEndpoint.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(IndexedEndpoint.INDEX_ATTRIB_NAME)) {
+ iEndpoint.setIndex(Integer.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME)) {
+ iEndpoint.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnmarshaller.java
index 7bb946f..b62b7b2 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnmarshaller.java
@@ -34,7 +34,7 @@ public class KeyDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- KeyDescriptor keyDescriptor = (KeyDescriptor) parentSAMLObject;
+ final KeyDescriptor keyDescriptor = (KeyDescriptor) parentSAMLObject;
if (childSAMLObject instanceof KeyInfo) {
keyDescriptor.setKeyInfo((KeyInfo) childSAMLObject);
@@ -47,17 +47,17 @@ public class KeyDescriptorUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- KeyDescriptor keyDescriptor = (KeyDescriptor) samlObject;
+ final KeyDescriptor keyDescriptor = (KeyDescriptor) samlObject;
- if (attribute.getName().equals(KeyDescriptor.USE_ATTRIB_NAME)) {
+ if (attribute.getName().equals(KeyDescriptor.USE_ATTRIB_NAME) && attribute.getNamespaceURI() == null) {
try {
- UsageType usageType = UsageType.valueOf(UsageType.class, attribute.getValue().toUpperCase());
+ final UsageType usageType = UsageType.valueOf(UsageType.class, attribute.getValue().toUpperCase());
// Only allow the enum values specified in the schema.
if (usageType != UsageType.SIGNING && usageType != UsageType.ENCRYPTION) {
throw new UnmarshallingException("Invalid key usage type: " + attribute.getValue());
}
keyDescriptor.setUse(usageType);
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
throw new UnmarshallingException("Invalid key usage type: " + attribute.getValue());
}
} else {
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedNameUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedNameUnmarshaller.java
index a45f89c..1c45b7d 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedNameUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedNameUnmarshaller.java
@@ -31,22 +31,25 @@ import org.w3c.dom.Attr;
*/
public class LocalizedNameUnmarshaller extends AbstractSAMLObjectUnmarshaller {
+ /** {@inheritDoc} */
+ protected void processElementContent(XMLObject samlObject, String elementContent) {
+ final LocalizedName name = (LocalizedName) samlObject;
+
+ name.setValue(elementContent);
+ }
+
/**
* {@inheritDoc}
*/
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
&& XMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
- LocalizedName name = (LocalizedName) samlObject;
+ final LocalizedName name = (LocalizedName) samlObject;
name.setXMLLang(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
- LocalizedName name = (LocalizedName) samlObject;
-
- name.setValue(elementContent);
- }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedURIUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedURIUnmarshaller.java
index 2a52b2a..b54d35f 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedURIUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/LocalizedURIUnmarshaller.java
@@ -31,22 +31,25 @@ import org.w3c.dom.Attr;
*/
public class LocalizedURIUnmarshaller extends AbstractSAMLObjectUnmarshaller {
+ /** {@inheritDoc} */
+ protected void processElementContent(XMLObject samlObject, String elementContent) {
+ final LocalizedURI name = (LocalizedURI) samlObject;
+
+ name.setValue(elementContent);
+ }
+
/**
* {@inheritDoc}
*/
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
&& XMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
- LocalizedURI name = (LocalizedURI) samlObject;
+ final LocalizedURI name = (LocalizedURI) samlObject;
name.setXMLLang(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
}
}
-
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
- LocalizedURI name = (LocalizedURI) samlObject;
-
- name.setValue(elementContent);
- }
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/OrganizationUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/OrganizationUnmarshaller.java
index fab4dc5..677bd0b 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/OrganizationUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/OrganizationUnmarshaller.java
@@ -39,7 +39,7 @@ public class OrganizationUnmarshaller extends AbstractSAMLObjectUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- Organization org = (Organization) parentSAMLObject;
+ final Organization org = (Organization) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
org.setExtensions((Extensions) childSAMLObject);
@@ -58,8 +58,12 @@ public class OrganizationUnmarshaller extends AbstractSAMLObjectUnmarshaller {
* {@inheritDoc}
*/
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- Organization org = (Organization) samlObject;
- processUnknownAttribute(org, attribute);
+ if (attribute.getNamespaceURI() == null) {
+ super.processAttribute(samlObject, attribute);
+ } else {
+ processUnknownAttribute((Organization) samlObject, attribute);
+ }
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RequestedAttributeUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RequestedAttributeUnmarshaller.java
index 381debd..728dce7 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RequestedAttributeUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RequestedAttributeUnmarshaller.java
@@ -35,11 +35,14 @@ public class RequestedAttributeUnmarshaller extends AttributeUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- RequestedAttribute requestedAttribute = (RequestedAttribute) samlObject;
- if (attribute.getLocalName().equals(RequestedAttribute.IS_REQUIRED_ATTRIB_NAME)) {
+ final RequestedAttribute requestedAttribute = (RequestedAttribute) samlObject;
+
+ if (attribute.getLocalName().equals(RequestedAttribute.IS_REQUIRED_ATTRIB_NAME)
+ && attribute.getNamespaceURI() == null) {
requestedAttribute.setIsRequired(XSBooleanValue.valueOf(attribute.getValue()));
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RoleDescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RoleDescriptorUnmarshaller.java
index 3cd6740..f5db319 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RoleDescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/RoleDescriptorUnmarshaller.java
@@ -46,7 +46,7 @@ public abstract class RoleDescriptorUnmarshaller extends AbstractSAMLObjectUnmar
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- RoleDescriptor roleDescriptor = (RoleDescriptor) parentSAMLObject;
+ final RoleDescriptor roleDescriptor = (RoleDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
roleDescriptor.setExtensions((Extensions) childSAMLObject);
@@ -65,25 +65,30 @@ public abstract class RoleDescriptorUnmarshaller extends AbstractSAMLObjectUnmar
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- RoleDescriptor roleDescriptor = (RoleDescriptor) samlObject;
+ final RoleDescriptor roleDescriptor = (RoleDescriptor) samlObject;
- if (attribute.getLocalName().equals(RoleDescriptor.ID_ATTRIB_NAME)) {
- roleDescriptor.setID(attribute.getValue());
- attribute.getOwnerElement().setIdAttributeNode(attribute, true);
- } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
- && !Strings.isNullOrEmpty(attribute.getValue())) {
- roleDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
- } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
- roleDescriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
- } else if (attribute.getLocalName().equals(RoleDescriptor.PROTOCOL_ENUMERATION_ATTRIB_NAME)) {
- StringTokenizer protocolTokenizer = new StringTokenizer(attribute.getValue(), " ");
- while (protocolTokenizer.hasMoreTokens()) {
- roleDescriptor.addSupportedProtocol(protocolTokenizer.nextToken());
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(RoleDescriptor.ID_ATTRIB_NAME)) {
+ roleDescriptor.setID(attribute.getValue());
+ attribute.getOwnerElement().setIdAttributeNode(attribute, true);
+ } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME)
+ && !Strings.isNullOrEmpty(attribute.getValue())) {
+ roleDescriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
+ } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) {
+ roleDescriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(RoleDescriptor.PROTOCOL_ENUMERATION_ATTRIB_NAME)) {
+ StringTokenizer protocolTokenizer = new StringTokenizer(attribute.getValue(), " ");
+ while (protocolTokenizer.hasMoreTokens()) {
+ roleDescriptor.addSupportedProtocol(protocolTokenizer.nextToken());
+ }
+ } else if (attribute.getLocalName().equals(RoleDescriptor.ERROR_URL_ATTRIB_NAME)) {
+ roleDescriptor.setErrorURL(attribute.getValue());
+ } else {
+ super.processAttribute(samlObject, attribute);
}
- } else if (attribute.getLocalName().equals(RoleDescriptor.ERROR_URL_ATTRIB_NAME)) {
- roleDescriptor.setErrorURL(attribute.getValue());
} else {
processUnknownAttribute(roleDescriptor, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/SPSSODescriptorUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/SPSSODescriptorUnmarshaller.java
index 479a51a..9e5656b 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/SPSSODescriptorUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/impl/SPSSODescriptorUnmarshaller.java
@@ -37,7 +37,7 @@ public class SPSSODescriptorUnmarshaller extends SSODescriptorUnmarshaller {
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
- SPSSODescriptor descriptor = (SPSSODescriptor) parentSAMLObject;
+ final SPSSODescriptor descriptor = (SPSSODescriptor) parentSAMLObject;
if (childSAMLObject instanceof AssertionConsumerService) {
descriptor.getAssertionConsumerServices().add((AssertionConsumerService) childSAMLObject);
@@ -50,14 +50,19 @@ public class SPSSODescriptorUnmarshaller extends SSODescriptorUnmarshaller {
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
- SPSSODescriptor descriptor = (SPSSODescriptor) samlObject;
+ final SPSSODescriptor descriptor = (SPSSODescriptor) samlObject;
- if (attribute.getLocalName().equals(SPSSODescriptor.AUTH_REQUESTS_SIGNED_ATTRIB_NAME)) {
- descriptor.setAuthnRequestsSigned(XSBooleanValue.valueOf(attribute.getValue()));
- } else if (attribute.getLocalName().equals(SPSSODescriptor.WANT_ASSERTIONS_SIGNED_ATTRIB_NAME)) {
- descriptor.setWantAssertionsSigned(XSBooleanValue.valueOf(attribute.getValue()));
+ if (attribute.getNamespaceURI() == null) {
+ if (attribute.getLocalName().equals(SPSSODescriptor.AUTH_REQUESTS_SIGNED_ATTRIB_NAME)) {
+ descriptor.setAuthnRequestsSigned(XSBooleanValue.valueOf(attribute.getValue()));
+ } else if (attribute.getLocalName().equals(SPSSODescriptor.WANT_ASSERTIONS_SIGNED_ATTRIB_NAME)) {
+ descriptor.setWantAssertionsSigned(XSBooleanValue.valueOf(attribute.getValue()));
+ } else {
+ super.processAttribute(samlObject, attribute);
+ }
} else {
super.processAttribute(samlObject, attribute);
}
}
+
}
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorTest.java
index 845fdd2..f7bd828 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorTest.java
@@ -52,9 +52,9 @@ public class AffiliationDescriptorTest extends XMLObjectProviderBaseTestCase {
protected DateTime expectedValidUntil;
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo"), new QName("flibble") };
+ protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo") };
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonTest.java
index 41b3782..8081ab9 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ContactPersonTest.java
@@ -50,9 +50,9 @@ public class ContactPersonTest extends XMLObjectProviderBaseTestCase {
protected int telephoneNumberCount = 3;
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo"), new QName("flibble") };
+ protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo") };
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorTest.java
index 0345f45..e9262eb 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorTest.java
@@ -61,10 +61,10 @@ public class EntityDescriptorTest extends XMLObjectProviderBaseTestCase {
protected DateTime expectedValidUntil;
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo"), new QName("flibble")};
+ protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo")};
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorTest.java
index a7e2bd1..dc9fd65 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorTest.java
@@ -67,10 +67,10 @@ public class IDPSSODescriptorTest extends XMLObjectProviderBaseTestCase {
protected XSBooleanValue expectedWantAuthnReqSigned;
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo"), new QName("flibble")};
+ protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo")};
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/OrganizationTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/OrganizationTest.java
index 957c6fd..e9fe023 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/OrganizationTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/OrganizationTest.java
@@ -40,10 +40,10 @@ import org.testng.annotations.Test;
public class OrganizationTest extends XMLObjectProviderBaseTestCase {
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo"), new QName("flibble")};
+ protected QName[] unknownAttributeNames = {new QName("urn:foo:bar", "bar", "foo")};
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceTest.java
index 7ab96c9..d1961e7 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceTest.java
@@ -42,9 +42,9 @@ public class SingleLogoutServiceTest extends XMLObjectProviderBaseTestCase {
protected String expectedResponseLocation;
/** Unknown Attributes */
- protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo"), new QName("flibble") };
+ protected QName[] unknownAttributeNames = { new QName("urn:foo:bar", "bar", "foo") };
/** Unknown Attribute Values */
- protected String[] unknownAttributeValues = {"fred", "flobble"};
+ protected String[] unknownAttributeValues = {"fred"};
/**
* Constructor
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnknownAttributes.xml
index 1a9d4ae..7850815 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/AffiliationDescriptorUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:AffiliationDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:AffiliationDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" foo:bar="fred"/>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnknownAttributes.xml
index 168499d..db1adfc 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/ContactPersonUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:ContactPerson xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" contactType="other" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:ContactPerson xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" contactType="other" foo:bar="fred"/>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnknownAttributes.xml
index e2198de..1c85d5c 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/EntityDescriptorUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" foo:bar="fred"/>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnknownAttributes.xml
index 1e4cbbb..dd0882b 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/IDPSSODescriptorUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:IDPSSODescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:IDPSSODescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" foo:bar="fred"/>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/OrganizationUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/OrganizationUnknownAttributes.xml
index f016473..8dfc1b2 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/OrganizationUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/OrganizationUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:Organization xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:Organization xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" foo:bar="fred"/>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceUnknownAttributes.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceUnknownAttributes.xml
index 6065546..ac6b994 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceUnknownAttributes.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/metadata/impl/SingleLogoutServiceUnknownAttributes.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><md:SingleLogoutService xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" flibble="flobble" foo:bar="fred"/>
+<?xml version="1.0" encoding="UTF-8"?><md:SingleLogoutService xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:foo="urn:foo:bar" foo:bar="fred"/>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list