[java-oidc-common] branch main updated: Null cleamup of XMLObjects, collapsing unneeded types and marshallers.
Scott Cantor
cantor.2 at osu.edu
Thu Nov 9 20:12:01 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-oidc-common.
View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=c5e3bc9df84db64858f51ced01f799ce16cf5f73
The following commit(s) were added to refs/heads/main by this push:
new c5e3bc9 Null cleamup of XMLObjects, collapsing unneeded types and marshallers.
c5e3bc9 is described below
commit c5e3bc9df84db64858f51ced01f799ce16cf5f73
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Nov 9 15:11:57 2023 -0500
Null cleamup of XMLObjects, collapsing unneeded types and marshallers.
---
.../oidc/saml/xmlobject/ClientSecret.java | 4 +-
.../saml/xmlobject/ClientSecretKeyReference.java | 4 +-
.../oidc/saml/xmlobject/DefaultAcrValue.java | 4 +-
.../shibboleth/oidc/saml/xmlobject/JwksData.java | 4 +-
.../shibboleth/oidc/saml/xmlobject/JwksUri.java | 4 +-
.../saml/xmlobject/MetadataValueSAMLObject.java | 10 +-
.../oidc/saml/xmlobject/PostLogoutRedirectUri.java | 4 +-
.../shibboleth/oidc/saml/xmlobject/RequestUri.java | 4 +-
oidc-common-saml-impl/pom.xml | 5 +
.../impl/AbstractMetadataValueMarshaller.java | 41 ------
.../impl/AbstractMetadataValueSAMLObject.java | 24 ++--
.../impl/AbstractMetadataValueUnmarshaller.java | 34 -----
.../saml/xmlobject/impl/ClientSecretBuilder.java | 16 +--
.../oidc/saml/xmlobject/impl/ClientSecretImpl.java | 11 +-
.../impl/ClientSecretKeyReferenceBuilder.java | 17 +--
.../impl/ClientSecretKeyReferenceImpl.java | 12 +-
.../impl/ClientSecretKeyReferenceMarshaller.java | 24 ----
.../impl/ClientSecretKeyReferenceUnmarshaller.java | 24 ----
.../xmlobject/impl/ClientSecretMarshaller.java | 24 ----
.../xmlobject/impl/ClientSecretUnmarshaller.java | 24 ----
.../xmlobject/impl/DefaultAcrValueBuilder.java | 17 +--
.../saml/xmlobject/impl/DefaultAcrValueImpl.java | 12 +-
.../xmlobject/impl/DefaultAcrValueMarshaller.java | 24 ----
.../impl/DefaultAcrValueUnmarshaller.java | 24 ----
.../oidc/saml/xmlobject/impl/JwksDataBuilder.java | 16 +--
.../oidc/saml/xmlobject/impl/JwksDataImpl.java | 11 +-
.../saml/xmlobject/impl/JwksDataMarshaller.java | 24 ----
.../saml/xmlobject/impl/JwksDataUnmarshaller.java | 24 ----
.../oidc/saml/xmlobject/impl/JwksUriBuilder.java | 16 +--
.../oidc/saml/xmlobject/impl/JwksUriImpl.java | 22 ++-
.../saml/xmlobject/impl/JwksUriMarshaller.java | 24 ----
.../saml/xmlobject/impl/JwksUriUnmarshaller.java | 24 ----
.../xmlobject/impl/OAuthRPExtensionsBuilder.java | 20 ++-
.../saml/xmlobject/impl/OAuthRPExtensionsImpl.java | 159 +++++++++++----------
.../impl/OAuthRPExtensionsMarshaller.java | 11 +-
.../impl/OAuthRPExtensionsUnmarshaller.java | 18 ++-
.../impl/PostLogoutRedirectUriBuilder.java | 17 +--
.../xmlobject/impl/PostLogoutRedirectUriImpl.java | 22 ++-
.../impl/PostLogoutRedirectUriMarshaller.java | 24 ----
.../impl/PostLogoutRedirectUriUnmarshaller.java | 24 ----
.../saml/xmlobject/impl/RequestUriBuilder.java | 16 +--
.../oidc/saml/xmlobject/impl/RequestUriImpl.java | 21 ++-
.../saml/xmlobject/impl/RequestUriMarshaller.java | 24 ----
.../xmlobject/impl/RequestUriUnmarshaller.java | 24 ----
.../impl/XMLObjectProviderInitializer.java | 8 +-
.../resources/saml2-metadata-oidcmd-config.xml | 36 ++---
.../saml/xmlobject/impl/BaseMetadataValueTest.java | 5 +-
.../oidc/saml/xmlobject/impl/ClientSecretTest.java | 1 +
.../saml/xmlobject/impl/OAuthRPExtensionsTest.java | 54 +++++--
49 files changed, 371 insertions(+), 645 deletions(-)
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecret.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecret.java
index 53d8339..e306d2b 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecret.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecret.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSString;
+
/**
* SAML2 OIDC metadata extension 'ClientSecret'.
*/
-public interface ClientSecret extends MetadataValueSAMLObject {
+public interface ClientSecret extends MetadataValueSAMLObject, XSString {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "ClientSecret";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecretKeyReference.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecretKeyReference.java
index 7919a2e..079b940 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecretKeyReference.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/ClientSecretKeyReference.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSString;
+
/**
* SAML2 OIDC metadata extension 'ClientSecretReferenceKey'.
*/
-public interface ClientSecretKeyReference extends MetadataValueSAMLObject {
+public interface ClientSecretKeyReference extends MetadataValueSAMLObject, XSString {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "ClientSecretKeyReference";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/DefaultAcrValue.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/DefaultAcrValue.java
index 2c09ce9..4f1a5b0 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/DefaultAcrValue.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/DefaultAcrValue.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSString;
+
/**
* SAML2 OIDC metadata extension 'DefaultAcrValue'.
*/
-public interface DefaultAcrValue extends MetadataValueSAMLObject {
+public interface DefaultAcrValue extends MetadataValueSAMLObject, XSString {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "default_acr_value";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksData.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksData.java
index 0c8d934..fc8a17d 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksData.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksData.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSString;
+
/**
* SAML2 OIDC metadata extension 'JwksData'.
*/
-public interface JwksData extends MetadataValueSAMLObject {
+public interface JwksData extends MetadataValueSAMLObject, XSString {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "JwksData";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksUri.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksUri.java
index 74b4ec3..e459402 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksUri.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/JwksUri.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSURI;
+
/**
* SAML2 OIDC metadata extension 'JwksUri'.
*/
-public interface JwksUri extends MetadataValueSAMLObject {
+public interface JwksUri extends MetadataValueSAMLObject, XSURI {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "JwksUri";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/MetadataValueSAMLObject.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/MetadataValueSAMLObject.java
index c682feb..62720f9 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/MetadataValueSAMLObject.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/MetadataValueSAMLObject.java
@@ -36,15 +36,21 @@ public abstract interface MetadataValueSAMLObject extends SAMLObject {
/**
* Get the value for this metadata object.
*
- * @return The value for this metadata object.
+ * @return The value for this metadata object
+ *
+ * @deprecated
*/
+ @Deprecated(since="3.0.0", forRemoval=true)
@Nullable String getValue();
/**
* Set the value for this metadata object.
*
- * @param newValue What to set.
+ * @param newValue What to set
+ *
+ * @deprecated
*/
+ @Deprecated(since="3.0.0", forRemoval=true)
void setValue(@Nullable final String newValue);
}
\ No newline at end of file
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/PostLogoutRedirectUri.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/PostLogoutRedirectUri.java
index eecd76c..6f67a21 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/PostLogoutRedirectUri.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/PostLogoutRedirectUri.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSURI;
+
/**
* SAML2 OIDC metadata extension 'PostLogoutRedirectUri'.
*/
-public interface PostLogoutRedirectUri extends MetadataValueSAMLObject {
+public interface PostLogoutRedirectUri extends MetadataValueSAMLObject, XSURI {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "post_logout_redirect_uri";
diff --git a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/RequestUri.java b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/RequestUri.java
index b5d99d2..b9a0987 100644
--- a/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/RequestUri.java
+++ b/oidc-common-saml-api/src/main/java/net/shibboleth/oidc/saml/xmlobject/RequestUri.java
@@ -17,10 +17,12 @@ package net.shibboleth.oidc.saml.xmlobject;
import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
+import org.opensaml.core.xml.schema.XSURI;
+
/**
* SAML2 OIDC metadata extension 'RequestUri'.
*/
-public interface RequestUri extends MetadataValueSAMLObject {
+public interface RequestUri extends MetadataValueSAMLObject, XSURI {
/** Element name, no namespace. */
@Nonnull static final String DEFAULT_ELEMENT_LOCAL_NAME = "request_uri";
diff --git a/oidc-common-saml-impl/pom.xml b/oidc-common-saml-impl/pom.xml
index 03da527..f8e1662 100644
--- a/oidc-common-saml-impl/pom.xml
+++ b/oidc-common-saml-impl/pom.xml
@@ -30,6 +30,11 @@
<artifactId>opensaml-core-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>${opensaml.groupId}</groupId>
+ <artifactId>opensaml-core-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>${opensaml.groupId}</groupId>
<artifactId>opensaml-saml-api</artifactId>
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueMarshaller.java
deleted file mode 100644
index badbd75..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueMarshaller.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import org.opensaml.core.xml.XMLObject;
-import org.opensaml.core.xml.io.MarshallingException;
-import org.opensaml.saml.common.AbstractSAMLObjectMarshaller;
-import org.w3c.dom.Element;
-
-import net.shibboleth.oidc.saml.xmlobject.MetadataValueSAMLObject;
-import net.shibboleth.shared.xml.ElementSupport;
-
-/**
- * Abstract thread safe Marshaller for {@link MetadataValueSAMLObject} objects.
- * @param <T> The metadata value.
- */
-public abstract class AbstractMetadataValueMarshaller<T extends MetadataValueSAMLObject>
- extends AbstractSAMLObjectMarshaller {
-
- /** {@inheritDoc} */
- protected void marshallElementContent(final XMLObject samlObject, final Element domElement)
- throws MarshallingException {
- final T metadataObject = (T) samlObject;
-
- if (metadataObject.getValue() != null) {
- ElementSupport.appendTextContent(domElement, metadataObject.getValue());
- }
- }
-}
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueSAMLObject.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueSAMLObject.java
index 061cf8f..86b5715 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueSAMLObject.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueSAMLObject.java
@@ -14,19 +14,24 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
-import java.util.Collections;
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 net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+
/**
* Base implementation for all simple metadata objects containing {@link String} value inside the element.
*/
public abstract class AbstractMetadataValueSAMLObject extends AbstractXMLObject {
/** The value for this metadata object. */
- private String value;
+ @Nullable private String value;
/**
* Constructor.
@@ -35,8 +40,8 @@ public abstract class AbstractMetadataValueSAMLObject extends AbstractXMLObject
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected AbstractMetadataValueSAMLObject(final String namespaceURI, final String elementLocalName,
- final String namespacePrefix) {
+ protected AbstractMetadataValueSAMLObject(@Nullable final String namespaceURI,
+ @Nonnull final String elementLocalName, @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
@@ -45,7 +50,7 @@ public abstract class AbstractMetadataValueSAMLObject extends AbstractXMLObject
*
* @return The value for this metadata object.
*/
- public String getValue() {
+ @Nullable public String getValue() {
return value;
}
@@ -54,13 +59,14 @@ public abstract class AbstractMetadataValueSAMLObject extends AbstractXMLObject
*
* @param newValue What to set.
*/
- public void setValue(final String newValue) {
+ public void setValue(@Nullable final String newValue) {
value = newValue;
}
/** {@inheritDoc} */
- public List<XMLObject> getOrderedChildren() {
- return Collections.emptyList();
+ @Override
+ @Nullable @Unmodifiable @NotLive public List<XMLObject> getOrderedChildren() {
+ return null;
}
-}
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueUnmarshaller.java
deleted file mode 100644
index 163bc9e..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/AbstractMetadataValueUnmarshaller.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import org.opensaml.core.xml.XMLObject;
-import org.opensaml.saml.common.AbstractSAMLObjectUnmarshaller;
-
-import net.shibboleth.oidc.saml.xmlobject.MetadataValueSAMLObject;
-
-/**
- * Abstract thread-safe Unmarshaller for {@link MetadataValueSAMLObject} objects.
- * @param <T> The metadata value.
- */
-public abstract class AbstractMetadataValueUnmarshaller<T extends MetadataValueSAMLObject>
- extends AbstractSAMLObjectUnmarshaller {
-
- /** {@inheritDoc} */
- protected void processElementContent(final XMLObject samlObject, final String elementContent) {
- final T metadataObject = (T) samlObject;
- metadataObject.setValue(elementContent);
- }
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretBuilder.java
index cdc876b..f8ffb3d 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.ClientSecret;
@@ -24,21 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.Constants;
*/
public class ClientSecretBuilder extends AbstractSAMLObjectBuilder<ClientSecret> {
- /**
- * Constructor.
- */
- public ClientSecretBuilder() {
-
- }
-
/** {@inheritDoc} */
- public ClientSecret buildObject() {
+ @Nonnull public ClientSecret buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, ClientSecret.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public ClientSecret buildObject(final String namespaceURI, final String localName, final String namespacePrefix) {
+ @Nonnull public ClientSecret buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new ClientSecretImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretImpl.java
index e0c2774..299d0db 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSStringImpl;
+
import net.shibboleth.oidc.saml.xmlobject.ClientSecret;
/**
* Concrete implementation of {@link ClientSecret}.
*/
-public class ClientSecretImpl extends AbstractMetadataValueSAMLObject implements ClientSecret {
+public class ClientSecretImpl extends XSStringImpl implements ClientSecret {
/**
* Constructor.
@@ -28,7 +33,9 @@ public class ClientSecretImpl extends AbstractMetadataValueSAMLObject implements
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected ClientSecretImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) {
+ protected ClientSecretImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceBuilder.java
index 6785964..b80e229 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.ClientSecretKeyReference;
@@ -24,22 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.Constants;
*/
public class ClientSecretKeyReferenceBuilder extends AbstractSAMLObjectBuilder<ClientSecretKeyReference> {
- /**
- * Constructor.
- */
- public ClientSecretKeyReferenceBuilder() {
-
- }
-
/** {@inheritDoc} */
- public ClientSecretKeyReference buildObject() {
+ @Nonnull public ClientSecretKeyReference buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, ClientSecretKeyReference.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public ClientSecretKeyReference buildObject(final String namespaceURI, final String localName,
- final String namespacePrefix) {
+ @Nonnull public ClientSecretKeyReference buildObject(@Nullable final String namespaceURI,
+ @Nonnull final String localName, @Nullable final String namespacePrefix) {
return new ClientSecretKeyReferenceImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceImpl.java
index 2b92c33..9f8c016 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSStringImpl;
+
import net.shibboleth.oidc.saml.xmlobject.ClientSecretKeyReference;
/**
* Concrete implementation of {@link ClientSecretKeyReference}.
*/
-public class ClientSecretKeyReferenceImpl extends AbstractMetadataValueSAMLObject implements ClientSecretKeyReference {
+public class ClientSecretKeyReferenceImpl extends XSStringImpl implements ClientSecretKeyReference {
/**
* Constructor.
@@ -28,8 +33,9 @@ public class ClientSecretKeyReferenceImpl extends AbstractMetadataValueSAMLObjec
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected ClientSecretKeyReferenceImpl(final String namespaceURI, final String elementLocalName,
- final String namespacePrefix) {
+ protected ClientSecretKeyReferenceImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceMarshaller.java
deleted file mode 100644
index e7ce2fe..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.ClientSecretKeyReference;
-
-/**
- * A thread safe Marshaller for {@link ClientSecretKeyReference} objects.
- */
-public class ClientSecretKeyReferenceMarshaller extends AbstractMetadataValueMarshaller<ClientSecretKeyReference> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceUnmarshaller.java
deleted file mode 100644
index 1cf968b..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretKeyReferenceUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.ClientSecretKeyReference;
-
-/**
- * A thread-safe Unmarshaller for {@link ClientSecretKeyReference} objects.
- */
-public class ClientSecretKeyReferenceUnmarshaller extends AbstractMetadataValueUnmarshaller<ClientSecretKeyReference> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretMarshaller.java
deleted file mode 100644
index cf3e754..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.ClientSecret;
-
-/**
- * A thread safe Marshaller for {@link ClientSecret} objects.
- */
-public class ClientSecretMarshaller extends AbstractMetadataValueMarshaller<ClientSecret> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretUnmarshaller.java
deleted file mode 100644
index a6a05b7..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.ClientSecret;
-
-/**
- * A thread-safe Unmarshaller for {@link ClientSecret} objects.
- */
-public class ClientSecretUnmarshaller extends AbstractMetadataValueUnmarshaller<ClientSecret> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueBuilder.java
index 50bd93d..a02da02 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.Constants;
@@ -24,22 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.DefaultAcrValue;
*/
public class DefaultAcrValueBuilder extends AbstractSAMLObjectBuilder<DefaultAcrValue> {
- /**
- * Constructor.
- */
- public DefaultAcrValueBuilder() {
-
- }
-
/** {@inheritDoc} */
- public DefaultAcrValue buildObject() {
+ @Nonnull public DefaultAcrValue buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, DefaultAcrValue.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public DefaultAcrValue buildObject(final String namespaceURI, final String localName,
- final String namespacePrefix) {
+ @Nonnull public DefaultAcrValue buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new DefaultAcrValueImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueImpl.java
index 4f5e75e..afdfe60 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSStringImpl;
+
import net.shibboleth.oidc.saml.xmlobject.DefaultAcrValue;
/**
* Concrete implementation of {@link DefaultAcrValue}.
*/
-public class DefaultAcrValueImpl extends AbstractMetadataValueSAMLObject implements DefaultAcrValue {
+public class DefaultAcrValueImpl extends XSStringImpl implements DefaultAcrValue {
/**
* Constructor.
@@ -28,8 +33,9 @@ public class DefaultAcrValueImpl extends AbstractMetadataValueSAMLObject impleme
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected DefaultAcrValueImpl(final String namespaceURI, final String elementLocalName,
- final String namespacePrefix) {
+ protected DefaultAcrValueImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueMarshaller.java
deleted file mode 100644
index 008e5f9..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.DefaultAcrValue;
-
-/**
- * A thread safe Marshaller for {@link DefaultAcrValue} objects.
- */
-public class DefaultAcrValueMarshaller extends AbstractMetadataValueMarshaller<DefaultAcrValue> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueUnmarshaller.java
deleted file mode 100644
index 585d6ff..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/DefaultAcrValueUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.DefaultAcrValue;
-
-/**
- * A thread-safe Unmarshaller for {@link DefaultAcrValue} objects.
- */
-public class DefaultAcrValueUnmarshaller extends AbstractMetadataValueUnmarshaller<DefaultAcrValue> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataBuilder.java
index bf79419..98cd809 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.Constants;
@@ -24,21 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.JwksData;
*/
public class JwksDataBuilder extends AbstractSAMLObjectBuilder<JwksData> {
- /**
- * Constructor.
- */
- public JwksDataBuilder() {
-
- }
-
/** {@inheritDoc} */
- public JwksData buildObject() {
+ @Nonnull public JwksData buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, JwksData.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public JwksData buildObject(final String namespaceURI, final String localName, final String namespacePrefix) {
+ @Nonnull public JwksData buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new JwksDataImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataImpl.java
index 2894117..a37b14e 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSStringImpl;
+
import net.shibboleth.oidc.saml.xmlobject.JwksData;
/**
* Concrete implementation of {@link JwksData}.
*/
-public class JwksDataImpl extends AbstractMetadataValueSAMLObject implements JwksData {
+public class JwksDataImpl extends XSStringImpl implements JwksData {
/**
* Constructor.
@@ -28,7 +33,9 @@ public class JwksDataImpl extends AbstractMetadataValueSAMLObject implements Jwk
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected JwksDataImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) {
+ protected JwksDataImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataMarshaller.java
deleted file mode 100644
index f7e969f..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.JwksData;
-
-/**
- * A thread safe Marshaller for {@link JwksData} objects.
- */
-public class JwksDataMarshaller extends AbstractMetadataValueMarshaller<JwksData> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataUnmarshaller.java
deleted file mode 100644
index b65c36e..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksDataUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.JwksData;
-
-/**
- * A thread-safe Unmarshaller for {@link JwksData} objects.
- */
-public class JwksDataUnmarshaller extends AbstractMetadataValueUnmarshaller<JwksData> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriBuilder.java
index fe625b3..67088e5 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.Constants;
@@ -24,21 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.JwksUri;
*/
public class JwksUriBuilder extends AbstractSAMLObjectBuilder<JwksUri> {
- /**
- * Constructor.
- */
- public JwksUriBuilder() {
-
- }
-
/** {@inheritDoc} */
- public JwksUri buildObject() {
+ @Nonnull public JwksUri buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, JwksUri.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public JwksUri buildObject(final String namespaceURI, final String localName, final String namespacePrefix) {
+ @Nonnull public JwksUri buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new JwksUriImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriImpl.java
index e9e8e8d..2d0a827 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSURIImpl;
+
import net.shibboleth.oidc.saml.xmlobject.JwksUri;
/**
* Concrete implementation of {@link JwksUri}.
*/
-public class JwksUriImpl extends AbstractMetadataValueSAMLObject implements JwksUri {
+public class JwksUriImpl extends XSURIImpl implements JwksUri {
/**
* Constructor.
@@ -28,7 +33,20 @@ public class JwksUriImpl extends AbstractMetadataValueSAMLObject implements Jwks
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected JwksUriImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) {
+ protected JwksUriImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
+ /** {@inheritDoc} */
+ @Nullable public String getValue() {
+ return getURI();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void setValue(@Nullable final String newValue) {
+ setURI(newValue);
+ }
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriMarshaller.java
deleted file mode 100644
index 5da3b08..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.JwksUri;
-
-/**
- * A thread safe Marshaller for {@link JwksUri} objects.
- */
-public class JwksUriMarshaller extends AbstractMetadataValueMarshaller<JwksUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriUnmarshaller.java
deleted file mode 100644
index 2b76858..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/JwksUriUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.JwksUri;
-
-/**
- * A thread-safe Unmarshaller for {@link JwksUri} objects.
- */
-public class JwksUriUnmarshaller extends AbstractMetadataValueUnmarshaller<JwksUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsBuilder.java
index 636ffbd..1249886 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.MetadataValueSAMLObject;
@@ -24,23 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.OAuthRPExtensions;
*/
public class OAuthRPExtensionsBuilder extends AbstractSAMLObjectBuilder<OAuthRPExtensions> {
- /** Constructor. */
- public OAuthRPExtensionsBuilder() {
-
- }
-
/** {@inheritDoc} */
- @Override
- public OAuthRPExtensions buildObject() {
- return buildObject(MetadataValueSAMLObject.SAML20MDOIDCMD_NS,
- OAuthRPExtensions.TYPE_LOCAL_NAME,
+ @Nonnull public OAuthRPExtensions buildObject() {
+ return buildObject(MetadataValueSAMLObject.SAML20MDOIDCMD_NS, OAuthRPExtensions.TYPE_LOCAL_NAME,
MetadataValueSAMLObject.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- @Override
- public OAuthRPExtensions buildObject(final String namespaceURI, final String localName,
- final String namespacePrefix) {
+ @Nonnull public OAuthRPExtensions buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new OAuthRPExtensionsImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsImpl.java
index 5283b1b..b2bbcff 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsImpl.java
@@ -18,6 +18,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.xml.namespace.QName;
import org.opensaml.core.xml.AbstractXMLObject;
@@ -30,6 +32,9 @@ import net.shibboleth.oidc.saml.xmlobject.DefaultAcrValue;
import net.shibboleth.oidc.saml.xmlobject.OAuthRPExtensions;
import net.shibboleth.oidc.saml.xmlobject.PostLogoutRedirectUri;
import net.shibboleth.oidc.saml.xmlobject.RequestUri;
+import net.shibboleth.shared.annotation.constraint.Live;
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
/**
* Implementation for {@link OAuthRPExtensions}.
@@ -37,64 +42,64 @@ import net.shibboleth.oidc.saml.xmlobject.RequestUri;
public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPExtensions {
/** Token endpoint authentication method for this entity. */
- private String tokenEndpointAuthMethod;
+ @Nullable private String tokenEndpointAuthMethod;
/** Response types for this entity. */
- private String responseTypes;
+ @Nullable private String responseTypes;
/** Grant types for this entity. */
- private String grantTypes;
+ @Nullable private String grantTypes;
/** Application type for this entity. */
- private String applicationType;
+ @Nullable private String applicationType;
/** Client URI for this entity. */
- private String clientUri;
+ @Nullable private String clientUri;
/** Scopes for this entity. */
- private String scopes;
+ @Nullable private String scopes;
/** Software identifier for this entity. */
- private String softwareId;
+ @Nullable private String softwareId;
/** Software version for this entity. */
- private String softwareVersion;
+ @Nullable private String softwareVersion;
/** Sector identifier URI for this entity. */
- private String sectorIdentifierUri;
+ @Nullable private String sectorIdentifierUri;
/** ID token signed response algorithm for this entity. */
- private String idTokenSignedResponseAlg;
+ @Nullable private String idTokenSignedResponseAlg;
/** ID token encrypted response algorithm for this entity. */
- private String idTokenEncryptedResponseAlg;
+ @Nullable private String idTokenEncryptedResponseAlg;
/** ID token encrypted response encoder for this entity. */
- private String idTokenEncryptedResponseEnc;
+ @Nullable private String idTokenEncryptedResponseEnc;
/** User info signed response algorithm for this entity. */
- private String userInfoSignedResponseAlg;
+ @Nullable private String userInfoSignedResponseAlg;
/** User info encrypted response algorithm for this entity. */
- private String userInfoEncryptedResponseAlg;
+ @Nullable private String userInfoEncryptedResponseAlg;
/** User info encrypted response encoder for this entity. */
- private String userInfoEncryptedResponseEnc;
+ @Nullable private String userInfoEncryptedResponseEnc;
/** Request object signing algorithm for this entity. */
- private String requestObjectSigningAlg;
+ @Nullable private String requestObjectSigningAlg;
/** Request object encryption algorithm for this entity. */
- private String requestObjectEncryptionAlg;
+ @Nullable private String requestObjectEncryptionAlg;
/** Request object encryption encoder for this entity. */
- private String requestObjectEncryptionEnc;
+ @Nullable private String requestObjectEncryptionEnc;
/** Token endpoint authentication signing algorithm for this entity. */
- private String tokenEndpointAuthSigningAlg;
+ @Nullable private String tokenEndpointAuthSigningAlg;
/** Initiate login URI for this entity. */
- private String initiateLoginUri;
+ @Nullable private String initiateLoginUri;
/** Default max age for this entity. */
private int defaultMaxAge;
@@ -109,19 +114,19 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
private boolean frontChannelLogoutSessionRequired;
/** Default ACR values for this entity. */
- private final XMLObjectChildrenList<DefaultAcrValue> defaultAcrValues;
+ @Nonnull private final XMLObjectChildrenList<DefaultAcrValue> defaultAcrValues;
/** Request URIs for this entity. */
- private final XMLObjectChildrenList<RequestUri> requestUris;
+ @Nonnull private final XMLObjectChildrenList<RequestUri> requestUris;
/** Post logout redirect URIs for this entity. */
- private final XMLObjectChildrenList<PostLogoutRedirectUri> postLogoutRedirectUris;
+ @Nonnull private final XMLObjectChildrenList<PostLogoutRedirectUri> postLogoutRedirectUris;
/** "anyAttribute" attributes. */
- private final AttributeMap unknownAttributes;
+ @Nonnull private final AttributeMap unknownAttributes;
/** "any" children. */
- private final IndexedXMLObjectChildrenList<XMLObject> unknownChildren;
+ @Nonnull private final IndexedXMLObjectChildrenList<XMLObject> unknownChildren;
/**
* Constructor.
@@ -130,8 +135,8 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected OAuthRPExtensionsImpl(final String namespaceURI, final String elementLocalName,
- final String namespacePrefix) {
+ protected OAuthRPExtensionsImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
defaultAcrValues = new XMLObjectChildrenList<>(this);
requestUris = new XMLObjectChildrenList<>(this);
@@ -141,203 +146,203 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
}
/** {@inheritDoc} */
- public String getResponseTypes() {
+ @Nullable public String getResponseTypes() {
return responseTypes;
}
/** {@inheritDoc} */
- public void setResponseTypes(final String types) {
+ public void setResponseTypes(@Nullable final String types) {
responseTypes = types;
}
/** {@inheritDoc} */
- public String getGrantTypes() {
+ @Nullable public String getGrantTypes() {
return grantTypes;
}
/** {@inheritDoc} */
- public void setGrantTypes(final String types) {
+ public void setGrantTypes(@Nullable final String types) {
grantTypes = types;
}
/** {@inheritDoc} */
- public String getApplicationType() {
+ @Nullable public String getApplicationType() {
return applicationType;
}
/** {@inheritDoc} */
- public void setApplicationType(final String type) {
+ public void setApplicationType(@Nullable final String type) {
applicationType = type;
}
/** {@inheritDoc} */
- public String getTokenEndpointAuthMethod() {
+ @Nullable public String getTokenEndpointAuthMethod() {
return tokenEndpointAuthMethod;
}
/** {@inheritDoc} */
- public void setTokenEndpointAuthMethod(final String method) {
+ public void setTokenEndpointAuthMethod(@Nullable final String method) {
tokenEndpointAuthMethod = method;
}
/** {@inheritDoc} */
- public String getClientUri() {
+ @Nullable public String getClientUri() {
return clientUri;
}
/** {@inheritDoc} */
- public void setClientUri(final String uri) {
+ public void setClientUri(@Nullable final String uri) {
clientUri = uri;
}
/** {@inheritDoc} */
- public String getScopes() {
+ @Nullable public String getScopes() {
return scopes;
}
/** {@inheritDoc} */
- public void setScopes(final String values) {
+ public void setScopes(@Nullable final String values) {
scopes = values;
}
/** {@inheritDoc} */
- public String getSoftwareId() {
+ @Nullable public String getSoftwareId() {
return softwareId;
}
/** {@inheritDoc} */
- public void setSoftwareId(final String id) {
+ public void setSoftwareId(@Nullable final String id) {
softwareId = id;
}
/** {@inheritDoc} */
- public String getSoftwareVersion() {
+ @Nullable public String getSoftwareVersion() {
return softwareVersion;
}
/** {@inheritDoc} */
- public void setSoftwareVersion(final String version) {
+ public void setSoftwareVersion(@Nullable final String version) {
softwareVersion = version;
}
/** {@inheritDoc} */
- public String getSectorIdentifierUri() {
+ @Nullable public String getSectorIdentifierUri() {
return sectorIdentifierUri;
}
/** {@inheritDoc} */
- public void setSectorIdentifierUri(final String uri) {
+ public void setSectorIdentifierUri(@Nullable final String uri) {
sectorIdentifierUri = uri;
}
/** {@inheritDoc} */
- public String getIdTokenSignedResponseAlg() {
+ @Nullable public String getIdTokenSignedResponseAlg() {
return idTokenSignedResponseAlg;
}
/** {@inheritDoc} */
- public void setIdTokenSignedResponseAlg(final String algorithm) {
+ public void setIdTokenSignedResponseAlg(@Nullable final String algorithm) {
idTokenSignedResponseAlg = algorithm;
}
/** {@inheritDoc} */
- public String getIdTokenEncryptedResponseAlg() {
+ @Nullable public String getIdTokenEncryptedResponseAlg() {
return idTokenEncryptedResponseAlg;
}
/** {@inheritDoc} */
- public void setIdTokenEncryptedResponseAlg(final String algorithm) {
+ public void setIdTokenEncryptedResponseAlg(@Nullable final String algorithm) {
idTokenEncryptedResponseAlg = algorithm;
}
/** {@inheritDoc} */
- public String getIdTokenEncryptedResponseEnc() {
+ @Nullable public String getIdTokenEncryptedResponseEnc() {
return idTokenEncryptedResponseEnc;
}
/** {@inheritDoc} */
- public void setIdTokenEncryptedResponseEnc(final String algorithm) {
+ public void setIdTokenEncryptedResponseEnc(@Nullable final String algorithm) {
idTokenEncryptedResponseEnc = algorithm;
}
/** {@inheritDoc} */
- public String getUserInfoSignedResponseAlg() {
+ @Nullable public String getUserInfoSignedResponseAlg() {
return userInfoSignedResponseAlg;
}
/** {@inheritDoc} */
- public void setUserInfoSignedResponseAlg(final String algorithm) {
+ public void setUserInfoSignedResponseAlg(@Nullable final String algorithm) {
userInfoSignedResponseAlg = algorithm;
}
/** {@inheritDoc} */
- public String getUserInfoEncryptedResponseAlg() {
+ @Nullable public String getUserInfoEncryptedResponseAlg() {
return userInfoEncryptedResponseAlg;
}
/** {@inheritDoc} */
- public void setUserInfoEncryptedResponseAlg(final String algorithm) {
+ public void setUserInfoEncryptedResponseAlg(@Nullable final String algorithm) {
userInfoEncryptedResponseAlg = algorithm;
}
/** {@inheritDoc} */
- public String getUserInfoEncryptedResponseEnc() {
+ @Nullable public String getUserInfoEncryptedResponseEnc() {
return userInfoEncryptedResponseEnc;
}
/** {@inheritDoc} */
- public void setUserInfoEncryptedResponseEnc(final String algorithm) {
+ public void setUserInfoEncryptedResponseEnc(@Nullable final String algorithm) {
userInfoEncryptedResponseEnc = algorithm;
}
/** {@inheritDoc} */
- public String getRequestObjectSigningAlg() {
+ @Nullable public String getRequestObjectSigningAlg() {
return requestObjectSigningAlg;
}
/** {@inheritDoc} */
- public void setRequestObjectSigningAlg(final String algorithm) {
+ public void setRequestObjectSigningAlg(@Nullable final String algorithm) {
requestObjectSigningAlg = algorithm;
}
/** {@inheritDoc} */
- public String getRequestObjectEncryptionAlg() {
+ @Nullable public String getRequestObjectEncryptionAlg() {
return requestObjectEncryptionAlg;
}
/** {@inheritDoc} */
- public void setRequestObjectEncryptionAlg(final String algorithm) {
+ public void setRequestObjectEncryptionAlg(@Nullable final String algorithm) {
requestObjectEncryptionAlg = algorithm;
}
/** {@inheritDoc} */
- public String getRequestObjectEncryptionEnc() {
+ @Nullable public String getRequestObjectEncryptionEnc() {
return requestObjectEncryptionEnc;
}
/** {@inheritDoc} */
- public void setRequestObjectEncryptionEnc(final String algorithm) {
+ public void setRequestObjectEncryptionEnc(@Nullable final String algorithm) {
requestObjectEncryptionEnc = algorithm;
}
/** {@inheritDoc} */
- public String getTokenEndpointAuthSigningAlg() {
+ @Nullable public String getTokenEndpointAuthSigningAlg() {
return tokenEndpointAuthSigningAlg;
}
/** {@inheritDoc} */
- public void setTokenEndpointAuthSigningAlg(final String algorithm) {
+ public void setTokenEndpointAuthSigningAlg(@Nullable final String algorithm) {
tokenEndpointAuthSigningAlg = algorithm;
}
/** {@inheritDoc} */
- public String getInitiateLoginUri() {
+ @Nullable public String getInitiateLoginUri() {
return initiateLoginUri;
}
/** {@inheritDoc} */
- public void setInitiateLoginUri(final String uri) {
+ public void setInitiateLoginUri(@Nullable final String uri) {
initiateLoginUri = uri;
}
@@ -362,23 +367,22 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
}
/** {@inheritDoc} */
- public List<DefaultAcrValue> getDefaultAcrValues() {
+ @Nonnull @Live public List<DefaultAcrValue> getDefaultAcrValues() {
return defaultAcrValues;
}
/** {@inheritDoc} */
- public List<RequestUri> getRequestUris() {
+ @Nonnull @Live public List<RequestUri> getRequestUris() {
return requestUris;
}
/** {@inheritDoc} */
- public List<PostLogoutRedirectUri> getPostLogoutRedirectUris() {
+ @Nonnull @Live public List<PostLogoutRedirectUri> getPostLogoutRedirectUris() {
return postLogoutRedirectUris;
}
/** {@inheritDoc} */
- @Override
- public List<XMLObject> getOrderedChildren() {
+ @Nullable @Unmodifiable @NotLive public List<XMLObject> getOrderedChildren() {
final ArrayList<XMLObject> children = new ArrayList<>();
children.addAll(getDefaultAcrValues());
@@ -390,20 +394,20 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
}
/** {@inheritDoc} */
- @Override
- public AttributeMap getUnknownAttributes() {
+ @Nonnull public AttributeMap getUnknownAttributes() {
return unknownAttributes;
}
/**
* {@inheritDoc}
*/
- public List<XMLObject> getUnknownXMLObjects() {
+ @Nonnull @Live public List<XMLObject> getUnknownXMLObjects() {
return unknownChildren;
}
/** {@inheritDoc} */
- public List<XMLObject> getUnknownXMLObjects(final QName typeOrName) {
+ @SuppressWarnings("unchecked")
+ @Nonnull @Live public List<XMLObject> getUnknownXMLObjects(@Nonnull final QName typeOrName) {
return (List<XMLObject>) unknownChildren.subList(typeOrName);
}
@@ -426,4 +430,5 @@ public class OAuthRPExtensionsImpl extends AbstractXMLObject implements OAuthRPE
public boolean isFrontChannelLogoutSessionRequired() {
return frontChannelLogoutSessionRequired;
}
-}
+
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsMarshaller.java
index 1ab9a1f..80f7a70 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsMarshaller.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsMarshaller.java
@@ -14,6 +14,8 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+
import org.opensaml.core.xml.XMLObject;
import org.opensaml.core.xml.io.MarshallingException;
import org.opensaml.saml.common.AbstractSAMLObjectMarshaller;
@@ -26,10 +28,10 @@ import net.shibboleth.oidc.saml.xmlobject.OAuthRPExtensions;
*/
public class OAuthRPExtensionsMarshaller extends AbstractSAMLObjectMarshaller {
- // Checkstyle: MethodLength|CyclomaticComplexity OFF
+// Checkstyle: MethodLength|CyclomaticComplexity OFF
/** {@inheritDoc} */
@Override
- protected void marshallAttributes(final XMLObject samlElement, final Element domElement)
+ protected void marshallAttributes(@Nonnull final XMLObject samlElement, @Nonnull final Element domElement)
throws MarshallingException {
final OAuthRPExtensions rpExtensions = (OAuthRPExtensions) samlElement;
@@ -156,5 +158,6 @@ public class OAuthRPExtensionsMarshaller extends AbstractSAMLObjectMarshaller {
marshallUnknownAttributes(rpExtensions, domElement);
}
- // Checkstyle: MethodLength|CyclomaticComplexity ON
-}
+// Checkstyle: MethodLength|CyclomaticComplexity ON
+
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsUnmarshaller.java
index 25f657f..47f35a2 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsUnmarshaller.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsUnmarshaller.java
@@ -14,6 +14,8 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+
import org.opensaml.core.xml.XMLObject;
import org.opensaml.core.xml.io.UnmarshallingException;
import org.opensaml.saml.common.AbstractSAMLObjectUnmarshaller;
@@ -30,11 +32,11 @@ import net.shibboleth.oidc.saml.xmlobject.RequestUri;
* Unmarshaller for {@link OAuthRPExtensions} objects.
*/
public class OAuthRPExtensionsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
-
-// Checkstyle: CyclomaticComplexity OFF
+
/** {@inheritDoc} */
- protected void processChildElement(final XMLObject parentSAMLObject, final XMLObject childSAMLObject)
- throws UnmarshallingException {
+ @Override
+ protected void processChildElement(@Nonnull final XMLObject parentSAMLObject,
+ @Nonnull final XMLObject childSAMLObject) throws UnmarshallingException {
final OAuthRPExtensions descriptor = (OAuthRPExtensions) parentSAMLObject;
if (childSAMLObject instanceof DefaultAcrValue) {
@@ -48,8 +50,11 @@ public class OAuthRPExtensionsUnmarshaller extends AbstractSAMLObjectUnmarshalle
}
}
+// Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
- protected void processAttribute(final XMLObject samlObject, final Attr attribute) throws UnmarshallingException {
+ @Override
+ protected void processAttribute(@Nonnull final XMLObject samlObject, @Nonnull final Attr attribute)
+ throws UnmarshallingException {
final OAuthRPExtensions descriptor = (OAuthRPExtensions) samlObject;
if (attribute.getNamespaceURI() == null) {
@@ -115,4 +120,5 @@ public class OAuthRPExtensionsUnmarshaller extends AbstractSAMLObjectUnmarshalle
}
}
// Checkstyle: CyclomaticComplexity OFF
-}
+
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriBuilder.java
index 7ecde74..2062374 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.Constants;
@@ -24,22 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.PostLogoutRedirectUri;
*/
public class PostLogoutRedirectUriBuilder extends AbstractSAMLObjectBuilder<PostLogoutRedirectUri> {
- /**
- * Constructor.
- */
- public PostLogoutRedirectUriBuilder() {
-
- }
-
/** {@inheritDoc} */
- public PostLogoutRedirectUri buildObject() {
+ @Nonnull public PostLogoutRedirectUri buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, PostLogoutRedirectUri.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public PostLogoutRedirectUri buildObject(final String namespaceURI, final String localName,
- final String namespacePrefix) {
+ @Nonnull public PostLogoutRedirectUri buildObject(@Nullable final String namespaceURI,
+ @Nonnull final String localName, @Nullable final String namespacePrefix) {
return new PostLogoutRedirectUriImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriImpl.java
index 51fc212..1cd93c9 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSURIImpl;
+
import net.shibboleth.oidc.saml.xmlobject.PostLogoutRedirectUri;
/**
* Concrete implementation of {@link PostLogoutRedirectUri}.
*/
-public class PostLogoutRedirectUriImpl extends AbstractMetadataValueSAMLObject implements PostLogoutRedirectUri {
+public class PostLogoutRedirectUriImpl extends XSURIImpl implements PostLogoutRedirectUri {
/**
* Constructor.
@@ -28,8 +33,19 @@ public class PostLogoutRedirectUriImpl extends AbstractMetadataValueSAMLObject i
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected PostLogoutRedirectUriImpl(final String namespaceURI, final String elementLocalName,
- final String namespacePrefix) {
+ protected PostLogoutRedirectUriImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
+ /** {@inheritDoc} */
+ @Nullable public String getValue() {
+ return getURI();
+ }
+
+ /** {@inheritDoc} */
+ public void setValue(@Nullable final String newValue) {
+ setURI(newValue);
+ }
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriMarshaller.java
deleted file mode 100644
index 68143a9..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.PostLogoutRedirectUri;
-
-/**
- * A thread safe Marshaller for {@link PostLogoutRedirectUri} objects.
- */
-public class PostLogoutRedirectUriMarshaller extends AbstractMetadataValueMarshaller<PostLogoutRedirectUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriUnmarshaller.java
deleted file mode 100644
index 2630854..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/PostLogoutRedirectUriUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.PostLogoutRedirectUri;
-
-/**
- * A thread-safe Unmarshaller for {@link PostLogoutRedirectUri} objects.
- */
-public class PostLogoutRedirectUriUnmarshaller extends AbstractMetadataValueUnmarshaller<PostLogoutRedirectUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriBuilder.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriBuilder.java
index bc365c2..a07e34f 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriBuilder.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriBuilder.java
@@ -14,6 +14,9 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import net.shibboleth.oidc.saml.xmlobject.Constants;
@@ -24,21 +27,16 @@ import net.shibboleth.oidc.saml.xmlobject.RequestUri;
*/
public class RequestUriBuilder extends AbstractSAMLObjectBuilder<RequestUri> {
- /**
- * Constructor.
- */
- public RequestUriBuilder() {
-
- }
-
/** {@inheritDoc} */
- public RequestUri buildObject() {
+ @Nonnull public RequestUri buildObject() {
return buildObject(Constants.SAML20MDOIDCMD_NS, RequestUri.DEFAULT_ELEMENT_LOCAL_NAME,
Constants.SAML20MDOIDCMD_PREFIX);
}
/** {@inheritDoc} */
- public RequestUri buildObject(final String namespaceURI, final String localName, final String namespacePrefix) {
+ @Nonnull public RequestUri buildObject(@Nullable final String namespaceURI, @Nonnull final String localName,
+ @Nullable final String namespacePrefix) {
return new RequestUriImpl(namespaceURI, localName, namespacePrefix);
}
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriImpl.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriImpl.java
index 091f834..943d9ed 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriImpl.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriImpl.java
@@ -14,12 +14,17 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.core.xml.schema.impl.XSURIImpl;
+
import net.shibboleth.oidc.saml.xmlobject.RequestUri;
/**
* Concrete implementation of {@link RequestUri}.
*/
-public class RequestUriImpl extends AbstractMetadataValueSAMLObject implements RequestUri {
+public class RequestUriImpl extends XSURIImpl implements RequestUri {
/**
* Constructor.
@@ -28,7 +33,19 @@ public class RequestUriImpl extends AbstractMetadataValueSAMLObject implements R
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
- protected RequestUriImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) {
+ protected RequestUriImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+ @Nullable final String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
+
+ /** {@inheritDoc} */
+ @Nullable public String getValue() {
+ return getURI();
+ }
+
+ /** {@inheritDoc} */
+ public void setValue(@Nullable final String newValue) {
+ setURI(newValue);
+ }
+
}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriMarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriMarshaller.java
deleted file mode 100644
index 0fef45e..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.RequestUri;
-
-/**
- * A thread safe Marshaller for {@link RequestUri} objects.
- */
-public class RequestUriMarshaller extends AbstractMetadataValueMarshaller<RequestUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriUnmarshaller.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriUnmarshaller.java
deleted file mode 100644
index 376eedc..0000000
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/RequestUriUnmarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.oidc.saml.xmlobject.impl;
-
-import net.shibboleth.oidc.saml.xmlobject.RequestUri;
-
-/**
- * A thread-safe Unmarshaller for {@link RequestUri} objects.
- */
-public class RequestUriUnmarshaller extends AbstractMetadataValueUnmarshaller<RequestUri> {
-
-}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/XMLObjectProviderInitializer.java b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/XMLObjectProviderInitializer.java
index 51831c8..ccb9ff8 100644
--- a/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/XMLObjectProviderInitializer.java
+++ b/oidc-common-saml-impl/src/main/java/net/shibboleth/oidc/saml/xmlobject/impl/XMLObjectProviderInitializer.java
@@ -14,6 +14,8 @@
package net.shibboleth.oidc.saml.xmlobject.impl;
+import javax.annotation.Nonnull;
+
import org.opensaml.core.xml.config.AbstractXMLObjectProviderInitializer;
/**
@@ -22,14 +24,14 @@ import org.opensaml.core.xml.config.AbstractXMLObjectProviderInitializer;
public class XMLObjectProviderInitializer extends AbstractXMLObjectProviderInitializer {
/** Config resources. */
- private static String[] configs = {
+ @Nonnull private static String[] configs = {
"/saml2-metadata-oidcmd-config.xml",
};
/** {@inheritDoc} */
@Override
- protected String[] getConfigResources() {
+ @Nonnull protected String[] getConfigResources() {
return configs;
}
-}
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/main/resources/saml2-metadata-oidcmd-config.xml b/oidc-common-saml-impl/src/main/resources/saml2-metadata-oidcmd-config.xml
index 48a9f2c..99e16f2 100644
--- a/oidc-common-saml-impl/src/main/resources/saml2-metadata-oidcmd-config.xml
+++ b/oidc-common-saml-impl/src/main/resources/saml2-metadata-oidcmd-config.xml
@@ -4,34 +4,34 @@
<!-- SAML Metadata OIDC profile object providers -->
<ObjectProviders>
- <ObjectProvider qualifiedName="oidcmd:ClientSecretKeyReference">
- <BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretKeyReferenceBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretKeyReferenceMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretKeyReferenceUnmarshaller"/>
- </ObjectProvider>
-
<ObjectProvider qualifiedName="oidcmd:ClientSecret">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringUnmarshaller"/>
+ </ObjectProvider>
+
+ <ObjectProvider qualifiedName="oidcmd:ClientSecretKeyReference">
+ <BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.ClientSecretKeyReferenceBuilder"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringUnmarshaller"/>
</ObjectProvider>
<ObjectProvider qualifiedName="oidcmd:default_acr_value">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.DefaultAcrValueBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.DefaultAcrValueMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.DefaultAcrValueUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringUnmarshaller"/>
</ObjectProvider>
<ObjectProvider qualifiedName="oidcmd:JwksData">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksDataBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksDataMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksDataUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSStringUnmarshaller"/>
</ObjectProvider>
<ObjectProvider qualifiedName="oidcmd:JwksUri">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksUriBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksUriMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.JwksUriUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIUnmarshaller"/>
</ObjectProvider>
<ObjectProvider qualifiedName="oidcmd:OAuthRPExtensions">
@@ -42,14 +42,14 @@
<ObjectProvider qualifiedName="oidcmd:post_logout_redirect_uri">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.PostLogoutRedirectUriBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.PostLogoutRedirectUriMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.PostLogoutRedirectUriUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIUnmarshaller"/>
</ObjectProvider>
<ObjectProvider qualifiedName="oidcmd:request_uri">
<BuilderClass className="net.shibboleth.oidc.saml.xmlobject.impl.RequestUriBuilder"/>
- <MarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.RequestUriMarshaller"/>
- <UnmarshallingClass className="net.shibboleth.oidc.saml.xmlobject.impl.RequestUriUnmarshaller"/>
+ <MarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIMarshaller"/>
+ <UnmarshallingClass className="org.opensaml.core.xml.schema.impl.XSURIUnmarshaller"/>
</ObjectProvider>
</ObjectProviders>
diff --git a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/BaseMetadataValueTest.java b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/BaseMetadataValueTest.java
index df6a4e8..b793eb1 100644
--- a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/BaseMetadataValueTest.java
+++ b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/BaseMetadataValueTest.java
@@ -42,7 +42,8 @@ public abstract class BaseMetadataValueTest extends XMLObjectProviderBaseTestCas
/** {@inheritDoc} */
@Test
public void testSingleElementUnmarshall() {
- MetadataValueSAMLObject object = (MetadataValueSAMLObject) unmarshallElement(singleElementFile);
+ final MetadataValueSAMLObject object = (MetadataValueSAMLObject) unmarshallElement(singleElementFile);
+ assert object != null;
Assert.assertEquals(object.getValue(), getExpectedValue(), "The metadata object did not have expected value");
}
@@ -57,4 +58,4 @@ public abstract class BaseMetadataValueTest extends XMLObjectProviderBaseTestCas
assertXMLEquals(expectedDOM, object);
}
-}
+}
\ No newline at end of file
diff --git a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretTest.java b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretTest.java
index 8361f4d..9185ee1 100644
--- a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretTest.java
+++ b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/ClientSecretTest.java
@@ -44,6 +44,7 @@ public class ClientSecretTest extends BaseMetadataValueTest {
return ClientSecret.DEFAULT_ELEMENT_NAME;
}
+ @SuppressWarnings("javadoc")
@Test
public void t() {
System.out.println("here");
diff --git a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsTest.java b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsTest.java
index 85ee430..c65935a 100644
--- a/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsTest.java
+++ b/oidc-common-saml-impl/src/test/java/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensionsTest.java
@@ -18,9 +18,13 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
import org.opensaml.core.testing.XMLObjectProviderBaseTestCase;
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.schema.XSString;
+import org.opensaml.core.xml.schema.XSURI;
import org.opensaml.saml.common.AbstractSAMLObjectBuilder;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -31,13 +35,14 @@ import net.shibboleth.oidc.saml.xmlobject.OAuthRPExtensions;
/**
* Test case for creating, marshalling, and unmarshalling {@link OAuthRPExtensions}.
*/
+ at SuppressWarnings("javadoc")
public class OAuthRPExtensionsTest extends XMLObjectProviderBaseTestCase {
- public static final String EXTENSION_NAMESPACE = "urn:unknown:namespace";
+ @Nonnull public static final String EXTENSION_NAMESPACE = "urn:unknown:namespace";
- public static final QName ATTRIBUTE_EXT_QNAME = new QName(EXTENSION_NAMESPACE, "attributeExtension1", "unknown");
+ @Nonnull public static final QName ATTRIBUTE_EXT_QNAME = new QName(EXTENSION_NAMESPACE, "attributeExtension1", "unknown");
- public static final String ATTRIBUTE_EXT_VALUE = "extensionValue1";
+ @Nonnull public static final String ATTRIBUTE_EXT_VALUE = "extensionValue1";
/**
* Constructor
@@ -87,8 +92,9 @@ public class OAuthRPExtensionsTest extends XMLObjectProviderBaseTestCase {
@Override
@Test
public void testChildElementsUnmarshall() {
- OAuthRPExtensions rpExtensions = (OAuthRPExtensions)
+ final OAuthRPExtensions rpExtensions = (OAuthRPExtensions)
unmarshallElement("/net/shibboleth/oidc/saml/xmlobject/impl/OAuthRPExtensions.xml");
+ assert rpExtensions != null;
final Object attributeExt = rpExtensions.getUnknownAttributes().get(ATTRIBUTE_EXT_QNAME);
Assert.assertNotNull(attributeExt);
@@ -147,27 +153,52 @@ public class OAuthRPExtensionsTest extends XMLObjectProviderBaseTestCase {
"The front-channel logout session id required did not have expected value");
}
- protected <T extends MetadataValueSAMLObject> void assertMetadataValue(final T metadataValue,
+ protected void assertMetadataValue(final XSString metadataValue,
final String expectedValue, final String message) {
Assert.assertEquals(metadataValue.getValue(), expectedValue, message);
}
- protected <T extends MetadataValueSAMLObject> void assertMetadataValueSet(final Set<T> metadataValues,
+ protected void assertMetadataValue(final XSURI metadataValue,
+ final String expectedValue, final String message) {
+ Assert.assertEquals(metadataValue.getURI(), expectedValue, message);
+ }
+
+ protected <T extends XMLObject> void assertMetadataValueSet(final Set<T> metadataValues,
final Set<T> expectedValues, final String message) {
- final Set<String> values = metadataValues.stream().map(T::getValue).collect(Collectors.toSet());
+ final Set<String> values = metadataValues.stream().map(o -> {
+ if (o instanceof XSString xs) {
+ return xs.getValue();
+ } else if (o instanceof XSURI xu) {
+ return xu.getURI();
+ } else {
+ return null;
+ }
+ }).collect(Collectors.toSet());
Assert.assertEquals(values, expectedValues, message);
}
- protected <T extends MetadataValueSAMLObject> void assertMetadataValueList(final List<T> metadataValues,
+ protected <T extends XMLObject> void assertMetadataValueList(final List<T> metadataValues,
final List<String> expectedValues, final String message) {
- final List<String> values = metadataValues.stream().map(T::getValue).collect(Collectors.toList());
+ final List<String> values = metadataValues.stream().map(o -> {
+ if (o instanceof XSString xs) {
+ return xs.getValue();
+ } else if (o instanceof XSURI xu) {
+ return xu.getURI();
+ } else {
+ return null;
+ }
+ }).collect(Collectors.toList());
Assert.assertEquals(values, expectedValues, message);
}
protected <T extends MetadataValueSAMLObject, B extends AbstractSAMLObjectBuilder<T>> T
buildMetadataValueObject(final B builder, final String value) {
final T object = builder.buildObject();
- object.setValue(value);
+ if (object instanceof XSString xs) {
+ xs.setValue(value);
+ } else if (object instanceof XSURI xu) {
+ xu.setURI(value);
+ }
return object;
}
@@ -178,4 +209,5 @@ public class OAuthRPExtensionsTest extends XMLObjectProviderBaseTestCase {
@Override
public void testSingleElementUnmarshall() {
}
-}
+
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list