[java-plugin-shibd-saml] branch main updated: Add Liberty PAOS XML providers.
Codeberg
noreply at shibboleth.net
Mon Aug 3 20:12:00 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd-saml.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-saml/commit/8cc879139a2057004a0a0401aad82b6636cd9f19
The following commit(s) were added to refs/heads/main by this push:
new 8cc8791 Add Liberty PAOS XML providers.
8cc8791 is described below
commit 8cc879139a2057004a0a0401aad82b6636cd9f19
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Aug 3 16:11:46 2026 -0400
Add Liberty PAOS XML providers.
---
.../net/shibboleth/sp/liberty/paos/Request.java | 98 ++++++++++++++
.../net/shibboleth/sp/liberty/paos/Response.java | 64 ++++++++++
.../shibboleth/sp/liberty/paos/package-info.java | 18 +++
.../sp/liberty/paos/impl/RequestBuilder.java | 40 ++++++
.../sp/liberty/paos/impl/RequestImpl.java | 142 +++++++++++++++++++++
.../sp/liberty/paos/impl/RequestMarshaller.java | 64 ++++++++++
.../sp/liberty/paos/impl/RequestUnmarshaller.java | 56 ++++++++
.../sp/liberty/paos/impl/ResponseBuilder.java | 40 ++++++
.../sp/liberty/paos/impl/ResponseImpl.java | 116 +++++++++++++++++
.../sp/liberty/paos/impl/ResponseMarshaller.java | 55 ++++++++
.../sp/liberty/paos/impl/ResponseUnmarshaller.java | 53 ++++++++
.../sp/liberty/paos/impl/package-info.java | 18 +++
.../config/impl/XMLObjectProviderInitializer.java | 37 ++++++
.../sp/saml/saml2/config/impl/package-info.java | 18 +++
.../src/main/resources/liberty-paos-config.xml | 34 +++++
15 files changed, 853 insertions(+)
diff --git a/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Request.java b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Request.java
new file mode 100644
index 0000000..b9f3436
--- /dev/null
+++ b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Request.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import javax.xml.namespace.QName;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.saml.common.xml.SAMLConstants;
+import org.opensaml.soap.soap11.ActorBearing;
+import org.opensaml.soap.soap11.MustUnderstandBearing;
+
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
+/**
+ * Liberty PAOS Request SOAP header.
+ */
+public interface Request extends XMLObject, MustUnderstandBearing, ActorBearing {
+
+ /** Element local name. */
+ @Nonnull @NotEmpty static final String DEFAULT_ELEMENT_LOCAL_NAME = "Request";
+
+ /** Default element name. */
+ @Nonnull static final QName DEFAULT_ELEMENT_NAME =
+ new QName(SAMLConstants.PAOS_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.PAOS_PREFIX);
+
+ /** Local name of the XSI type. */
+ @Nonnull @NotEmpty static final String TYPE_LOCAL_NAME = "RequestType";
+
+ /** QName of the XSI type. */
+ @Nonnull static final QName TYPE_NAME =
+ new QName(SAMLConstants.PAOS_NS, TYPE_LOCAL_NAME, SAMLConstants.PAOS_PREFIX);
+
+ /** messageID attribute name. */
+ @Nonnull @NotEmpty static final String MESSAGE_ID_ATTRIB_NAME = "messageID";
+
+ /** responseConsumerURL attribute name. */
+ @Nonnull @NotEmpty static final String RESPONSE_URL_ATTRIB_NAME = "responseConsumerURL";
+
+ /** service attribute name. */
+ @Nonnull @NotEmpty static final String SERVICE_ATTRIB_NAME = "service";
+
+ /**
+ * Get the messageID attribute value.
+ *
+ * @return the messageID attribute value
+ */
+ @Nullable String getMessageID();
+
+ /**
+ * Set the messageID attribute value.
+ *
+ * @param id the new messageID attribute value
+ */
+ void setMessageID(@Nullable final String id);
+
+ /**
+ * Get the responseConsumerURL attribute value.
+ *
+ * @return the responseConsumerURL attribute value
+ */
+ @Nullable String getResponseConsumerURL();
+
+ /**
+ * Set the responseConsumerURL attribute value.
+ *
+ * @param url the new responseConsumerURL attribute value
+ */
+ void setResponseConsumerURL(@Nullable final String url);
+
+ /**
+ * Get the service attribute value.
+ *
+ * @return the service attribute value
+ */
+ @Nullable String getService();
+
+ /**
+ * Set the service attribute value.
+ *
+ * @param svc the new service attribute value
+ */
+ void setService(@Nullable final String svc);
+
+}
\ No newline at end of file
diff --git a/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Response.java b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Response.java
new file mode 100644
index 0000000..83ed353
--- /dev/null
+++ b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/Response.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import javax.xml.namespace.QName;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.saml.common.xml.SAMLConstants;
+import org.opensaml.soap.soap11.ActorBearing;
+import org.opensaml.soap.soap11.MustUnderstandBearing;
+
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
+/**
+ * Liberty PAOS Response SOAP header.
+ */
+public interface Response extends XMLObject, MustUnderstandBearing, ActorBearing {
+
+ /** Element local name. */
+ @Nonnull @NotEmpty static final String DEFAULT_ELEMENT_LOCAL_NAME = "Response";
+
+ /** Default element name. */
+ @Nonnull static final QName DEFAULT_ELEMENT_NAME =
+ new QName(SAMLConstants.PAOS_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.PAOS_PREFIX);
+
+ /** Local name of the XSI type. */
+ @Nonnull @NotEmpty static final String TYPE_LOCAL_NAME = "ResponseType";
+
+ /** QName of the XSI type. */
+ @Nonnull static final QName TYPE_NAME =
+ new QName(SAMLConstants.PAOS_NS, TYPE_LOCAL_NAME, SAMLConstants.PAOS_PREFIX);
+
+ /** messageID attribute name. */
+ @Nonnull @NotEmpty static final String REF_TO_MESSAGE_ID_ATTRIB_NAME = "refToMessageID";
+
+ /**
+ * Get the refToMessageID attribute value.
+ *
+ * @return the refToMessageID attribute value
+ */
+ @Nullable String getRefToMessageID();
+
+ /**
+ * Set the refToMessageID attribute value.
+ *
+ * @param id the new refToMessageID attribute value
+ */
+ void setRefToMessageID(@Nullable final String id);
+
+}
\ No newline at end of file
diff --git a/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/package-info.java b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/package-info.java
new file mode 100644
index 0000000..48237e8
--- /dev/null
+++ b/sp-saml-api/src/main/java/net/shibboleth/sp/liberty/paos/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * PAOS XML APIs.
+ */
+package net.shibboleth.sp.liberty.paos;
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestBuilder.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestBuilder.java
new file mode 100644
index 0000000..e8f6afd
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestBuilder.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.AbstractXMLObjectBuilder;
+
+import net.shibboleth.sp.liberty.paos.Request;
+
+/**
+ * A Builder for {@link Request} objects.
+ */
+public class RequestBuilder extends AbstractXMLObjectBuilder<Request> {
+
+ /** {@inheritDoc} */
+ @Override
+ @Nonnull public Request buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
+ return new RequestImpl(namespaceURI, localName, namespacePrefix);
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestImpl.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestImpl.java
new file mode 100644
index 0000000..e502079
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestImpl.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.AbstractXMLObject;
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.opensaml.soap.soap11.ActorBearing;
+import org.opensaml.soap.soap11.MustUnderstandBearing;
+
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.sp.liberty.paos.Request;
+
+/**
+ * A concrete implementation of {@link Request}.
+ */
+public class RequestImpl extends AbstractXMLObject implements Request {
+
+ /** messageID attribute. */
+ @Nullable private String messageID;
+
+ /** responseConsumerURL attribute. */
+ @Nullable private String responseConsumerURL;
+
+ /** service attribute. */
+ @Nullable private String service;
+
+ /** soap11:actor attribute. */
+ @Nullable private String soap11Actor;
+
+ /** soap11:mustUnderstand. */
+ @Nullable private XSBooleanValue soap11MustUnderstand;
+
+ /**
+ * Constructor.
+ *
+ * @param namespaceURI the namespace the element is in
+ * @param elementLocalName the local name of the XML element this Object represents
+ * @param namespacePrefix the prefix for the given namespace
+ */
+ protected RequestImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
+ super(namespaceURI, elementLocalName, namespacePrefix);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getMessageID() {
+ return messageID;
+ }
+
+ /** {@inheritDoc} */
+ public void setMessageID(@Nullable final String id) {
+ messageID = prepareForAssignment(messageID, id);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getResponseConsumerURL() {
+ return responseConsumerURL;
+ }
+
+ /** {@inheritDoc} */
+ public void setResponseConsumerURL(@Nullable final String url) {
+ responseConsumerURL = prepareForAssignment(responseConsumerURL, url);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getService() {
+ return service;
+ }
+
+ /** {@inheritDoc} */
+ public void setService(@Nullable final String svc) {
+ service = prepareForAssignment(service, svc);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public Boolean isSOAP11MustUnderstand() {
+ if (soap11MustUnderstand != null) {
+ return soap11MustUnderstand.getValue();
+ }
+ return Boolean.FALSE;
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public XSBooleanValue isSOAP11MustUnderstandXSBoolean() {
+ return soap11MustUnderstand;
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11MustUnderstand(@Nullable final Boolean newMustUnderstand) {
+ if (newMustUnderstand != null) {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand,
+ new XSBooleanValue(newMustUnderstand, true));
+ } else {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand, null);
+ }
+ manageQualifiedAttributeNamespace(MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
+ soap11MustUnderstand != null);
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11MustUnderstand(@Nullable final XSBooleanValue newMustUnderstand) {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand, newMustUnderstand);
+ manageQualifiedAttributeNamespace(MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
+ soap11MustUnderstand != null);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getSOAP11Actor() {
+ return soap11Actor;
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11Actor(@Nullable final String newActor) {
+ soap11Actor = prepareForAssignment(soap11Actor, newActor);
+ manageQualifiedAttributeNamespace(ActorBearing.SOAP11_ACTOR_ATTR_NAME, soap11Actor != null);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @NotLive @Unmodifiable public List<XMLObject> getOrderedChildren() {
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestMarshaller.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestMarshaller.java
new file mode 100644
index 0000000..8c0b13d
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestMarshaller.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.io.AbstractXMLObjectMarshaller;
+import org.opensaml.core.xml.io.MarshallingException;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.opensaml.core.xml.util.XMLObjectSupport;
+import org.w3c.dom.Element;
+
+import net.shibboleth.sp.liberty.paos.Request;
+
+/**
+ * Marshaller for instances of {@link Request}.
+ */
+public class RequestMarshaller extends AbstractXMLObjectMarshaller {
+
+ /** {@inheritDoc} */
+ @Override
+ protected void marshallAttributes(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
+ throws MarshallingException {
+ final Request request = (Request) xmlObject;
+
+ if (request.getMessageID() != null) {
+ domElement.setAttributeNS(null, Request.MESSAGE_ID_ATTRIB_NAME, request.getMessageID());
+ }
+
+ if (request.getResponseConsumerURL() != null) {
+ domElement.setAttributeNS(null, Request.RESPONSE_URL_ATTRIB_NAME, request.getResponseConsumerURL());
+ }
+
+ if (request.getService() != null) {
+ domElement.setAttributeNS(null, Request.SERVICE_ATTRIB_NAME, request.getService());
+ }
+
+ XSBooleanValue flag = request.isSOAP11MustUnderstandXSBoolean();
+ if (flag != null) {
+ XMLObjectSupport.marshallAttribute(Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME, flag.toString(), domElement,
+ false);
+ }
+
+ if (request.getSOAP11Actor() != null) {
+ XMLObjectSupport.marshallAttribute(Request.SOAP11_ACTOR_ATTR_NAME,
+ request.getSOAP11Actor(), domElement, false);
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestUnmarshaller.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestUnmarshaller.java
new file mode 100644
index 0000000..88f830d
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/RequestUnmarshaller.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+import javax.xml.namespace.QName;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
+import org.opensaml.core.xml.io.UnmarshallingException;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.w3c.dom.Attr;
+
+import net.shibboleth.shared.xml.QNameSupport;
+import net.shibboleth.sp.liberty.paos.Request;
+
+/**
+ * Unmarshaller for instances of {@link Request}.
+ */
+public class RequestUnmarshaller extends AbstractXMLObjectUnmarshaller {
+
+ /** {@inheritDoc} */
+ @Override
+ protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
+ throws UnmarshallingException {
+ final Request request = (Request) xmlObject;
+
+ final QName attrName = QNameSupport.getNodeQName(attribute);
+ if (Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
+ request.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
+ } else if (Request.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
+ request.setSOAP11Actor(attribute.getValue());
+ } else if (Request.MESSAGE_ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ request.setMessageID(attribute.getValue());
+ } else if (Request.RESPONSE_URL_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ request.setResponseConsumerURL(attribute.getValue());
+ } else if (Request.SERVICE_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ request.setService(attribute.getValue());
+ } else {
+ super.processAttribute(xmlObject, attribute);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseBuilder.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseBuilder.java
new file mode 100644
index 0000000..cb797d0
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseBuilder.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.AbstractXMLObjectBuilder;
+
+import net.shibboleth.sp.liberty.paos.Response;
+
+/**
+ * A Builder for {@link Response} objects.
+ */
+public class ResponseBuilder extends AbstractXMLObjectBuilder<Response> {
+
+ /** {@inheritDoc} */
+ @Override
+ @Nonnull public Response buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
+ return new ResponseImpl(namespaceURI, localName, namespacePrefix);
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseImpl.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseImpl.java
new file mode 100644
index 0000000..ffe9e0b
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseImpl.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.AbstractXMLObject;
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.opensaml.soap.soap11.ActorBearing;
+import org.opensaml.soap.soap11.MustUnderstandBearing;
+
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.sp.liberty.paos.Response;
+
+/**
+ * A concrete implementation of {@link Response}.
+ */
+public class ResponseImpl extends AbstractXMLObject implements Response {
+
+ /** The refToMessageID attribute value. */
+ @Nullable private String refToMessageID;
+
+ /** soap11:actor attribute. */
+ @Nullable private String soap11Actor;
+
+ /** soap11:mustUnderstand. */
+ @Nullable private XSBooleanValue soap11MustUnderstand;
+
+ /**
+ * Constructor.
+ *
+ * @param namespaceURI the namespace the element is in
+ * @param elementLocalName the local name of the XML element this Object represents
+ * @param namespacePrefix the prefix for the given namespace
+ */
+ protected ResponseImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
+ super(namespaceURI, elementLocalName, namespacePrefix);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getRefToMessageID() {
+ return refToMessageID;
+ }
+
+ /** {@inheritDoc} */
+ public void setRefToMessageID(@Nullable final String id) {
+ refToMessageID = prepareForAssignment(refToMessageID, id);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public Boolean isSOAP11MustUnderstand() {
+ if (soap11MustUnderstand != null) {
+ return soap11MustUnderstand.getValue();
+ }
+ return Boolean.FALSE;
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public XSBooleanValue isSOAP11MustUnderstandXSBoolean() {
+ return soap11MustUnderstand;
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11MustUnderstand(@Nullable final Boolean newMustUnderstand) {
+ if (newMustUnderstand != null) {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand,
+ new XSBooleanValue(newMustUnderstand, true));
+ } else {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand, null);
+ }
+ manageQualifiedAttributeNamespace(MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
+ soap11MustUnderstand != null);
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11MustUnderstand(@Nullable final XSBooleanValue newMustUnderstand) {
+ soap11MustUnderstand = prepareForAssignment(soap11MustUnderstand, newMustUnderstand);
+ manageQualifiedAttributeNamespace(MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
+ soap11MustUnderstand != null);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable public String getSOAP11Actor() {
+ return soap11Actor;
+ }
+
+ /** {@inheritDoc} */
+ public void setSOAP11Actor(@Nullable final String newActor) {
+ soap11Actor = prepareForAssignment(soap11Actor, newActor);
+ manageQualifiedAttributeNamespace(ActorBearing.SOAP11_ACTOR_ATTR_NAME, soap11Actor != null);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @NotLive @Unmodifiable public List<XMLObject> getOrderedChildren() {
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseMarshaller.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseMarshaller.java
new file mode 100644
index 0000000..38d7c96
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseMarshaller.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.io.AbstractXMLObjectMarshaller;
+import org.opensaml.core.xml.io.MarshallingException;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.opensaml.core.xml.util.XMLObjectSupport;
+import org.w3c.dom.Element;
+
+import net.shibboleth.sp.liberty.paos.Response;
+
+/**
+ * Marshaller for instances of {@link Response}.
+ */
+public class ResponseMarshaller extends AbstractXMLObjectMarshaller {
+
+ /** {@inheritDoc} */
+ @Override
+ protected void marshallAttributes(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
+ throws MarshallingException {
+ final Response response = (Response) xmlObject;
+
+ if (response.getRefToMessageID() != null) {
+ domElement.setAttributeNS(null, Response.REF_TO_MESSAGE_ID_ATTRIB_NAME, response.getRefToMessageID());
+ }
+
+ final XSBooleanValue mustUnderstand = response.isSOAP11MustUnderstandXSBoolean();
+ if (mustUnderstand != null) {
+ XMLObjectSupport.marshallAttribute(Response.SOAP11_MUST_UNDERSTAND_ATTR_NAME, mustUnderstand.toString(),
+ domElement, false);
+ }
+
+ if (response.getSOAP11Actor() != null) {
+ XMLObjectSupport.marshallAttribute(Response.SOAP11_ACTOR_ATTR_NAME,
+ response.getSOAP11Actor(), domElement, false);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseUnmarshaller.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseUnmarshaller.java
new file mode 100644
index 0000000..2a0704e
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/ResponseUnmarshaller.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.liberty.paos.impl;
+
+import javax.annotation.Nonnull;
+import javax.xml.namespace.QName;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
+import org.opensaml.core.xml.io.UnmarshallingException;
+import org.opensaml.core.xml.schema.XSBooleanValue;
+import org.w3c.dom.Attr;
+
+import net.shibboleth.shared.xml.QNameSupport;
+import net.shibboleth.sp.liberty.paos.Response;
+
+/**
+ * Unmarshaller for instances of {@link Response}.
+ */
+public class ResponseUnmarshaller extends AbstractXMLObjectUnmarshaller {
+
+ /** {@inheritDoc} */
+ @Override
+ protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
+ throws UnmarshallingException {
+ final Response response = (Response) xmlObject;
+
+ final QName attrName = QNameSupport.getNodeQName(attribute);
+ if (Response.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
+ response.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
+ } else if (Response.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
+ response.setSOAP11Actor(attribute.getValue());
+ } else if (Response.REF_TO_MESSAGE_ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
+ response.setRefToMessageID(attribute.getValue());
+ } else {
+ super.processAttribute(xmlObject, attribute);
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/package-info.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/package-info.java
new file mode 100644
index 0000000..268f5e4
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/liberty/paos/impl/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Liberty PAOS XML implementation.
+ */
+package net.shibboleth.sp.liberty.paos.impl;
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/XMLObjectProviderInitializer.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/XMLObjectProviderInitializer.java
new file mode 100644
index 0000000..3d9638c
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/XMLObjectProviderInitializer.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.saml.saml2.config.impl;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.core.xml.config.AbstractXMLObjectProviderInitializer;
+
+/**
+ * XMLObject provider initializer for Liberty PAOS schema.
+ */
+public class XMLObjectProviderInitializer extends AbstractXMLObjectProviderInitializer {
+
+ /** Config resources. */
+ @Nonnull private static String[] configs = {
+ "/liberty-paos-config.xml",
+ };
+
+ /** {@inheritDoc} */
+ @Override
+ @Nonnull protected String[] getConfigResources() {
+ return configs;
+ }
+
+}
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/package-info.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/package-info.java
new file mode 100644
index 0000000..920b38d
--- /dev/null
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/config/impl/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * OpenSAML configuration initializers.
+ */
+package net.shibboleth.sp.saml.saml2.config.impl;
\ No newline at end of file
diff --git a/sp-saml-impl/src/main/resources/liberty-paos-config.xml b/sp-saml-impl/src/main/resources/liberty-paos-config.xml
new file mode 100644
index 0000000..a65c623
--- /dev/null
+++ b/sp-saml-impl/src/main/resources/liberty-paos-config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMLTooling xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paos="urn:liberty:paos:2003-08" xmlns="http://www.opensaml.org/xmltooling-config" xsi:schemaLocation="http://www.opensaml.org/xmltooling-config ../../src/schema/xmltooling-config.xsd">
+
+ <!-- Liberty PAOS Object providers -->
+ <ObjectProviders>
+
+ <!-- Request -->
+ <ObjectProvider qualifiedName="paos:Request">
+ <BuilderClass className="net.shibboleth.sp.liberty.paos.impl.RequestBuilder"/>
+ <MarshallingClass className="net.shibboleth.sp.liberty.paos.impl.RequestMarshaller"/>
+ <UnmarshallingClass className="net.shibboleth.sp.liberty.paos.impl.RequestUnmarshaller"/>
+ </ObjectProvider>
+
+ <ObjectProvider qualifiedName="paos:RequestType">
+ <BuilderClass className="net.shibboleth.sp.liberty.paos.impl.RequestBuilder"/>
+ <MarshallingClass className="net.shibboleth.sp.liberty.paos.impl.RequestMarshaller"/>
+ <UnmarshallingClass className="net.shibboleth.sp.liberty.paos.impl.RequestUnmarshaller"/>
+ </ObjectProvider>
+
+ <!-- Response -->
+ <ObjectProvider qualifiedName="paos:Response">
+ <BuilderClass className="net.shibboleth.sp.liberty.paos.impl.ResponseBuilder"/>
+ <MarshallingClass className="net.shibboleth.sp.liberty.paos.impl.ResponseMarshaller"/>
+ <UnmarshallingClass className="net.shibboleth.sp.liberty.paos.impl.ResponseUnmarshaller"/>
+ </ObjectProvider>
+
+ <ObjectProvider qualifiedName="paos:ResponseType">
+ <BuilderClass className="net.shibboleth.sp.liberty.paos.impl.ResponseBuilder"/>
+ <MarshallingClass className="net.shibboleth.sp.liberty.paos.impl.ResponseMarshaller"/>
+ <UnmarshallingClass className="net.shibboleth.sp.liberty.paos.impl.ResponseUnmarshaller"/>
+ </ObjectProvider>
+
+ </ObjectProviders>
+ </XMLTooling>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list