[java-opensaml] branch main updated: JMETAGEN-5 - Metadata generator support

Scott Cantor cantor.2 at osu.edu
Tue Jul 11 20:00:12 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=dbc636a1e1339002a016e2cfad8a0aa99f8b1090

The following commit(s) were added to refs/heads/main by this push:
     new dbc636a1e JMETAGEN-5 - Metadata generator support
dbc636a1e is described below

commit dbc636a1e1339002a016e2cfad8a0aa99f8b1090
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 11 16:00:09 2023 -0400

    JMETAGEN-5 - Metadata generator support
    
    https://shibboleth.atlassian.net/browse/JMETAGEN-5
    
    Add some features.
---
 .../impl/MetadataGeneratorParameters.java          | 23 +++++++++++++++++++++-
 .../templates/metadata/EntityDescriptor.vm         | 11 ++++++++++-
 .../templates/metadata/SPSSODescriptor.vm          |  5 ++++-
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/generator/impl/MetadataGeneratorParameters.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/generator/impl/MetadataGeneratorParameters.java
index 374f65d30..bf25ea31a 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/generator/impl/MetadataGeneratorParameters.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/generator/impl/MetadataGeneratorParameters.java
@@ -113,5 +113,26 @@ public interface MetadataGeneratorParameters {
      * @return base64-encoded certificates
      */
     @Nonnull @Unmodifiable @NotLive List<String> getEncryptionCertificates();
-        
+    
+    /**
+     * Get the language tag for language-specific content.
+     *
+     * @return language tag
+     */
+    @Nullable String getLang();
+    
+    /**
+     * Get the organization name.
+     *
+     * @return organization name
+     */
+    @Nullable String getOrganizationName();
+
+    /**
+     * Get the organization URL.
+     *
+     * @return organization URL
+     */
+    @Nullable String getOrganizationURL();
+
 }
\ No newline at end of file
diff --git a/opensaml-saml-impl/src/main/resources/templates/metadata/EntityDescriptor.vm b/opensaml-saml-impl/src/main/resources/templates/metadata/EntityDescriptor.vm
index 0991c32ef..7b3b56b49 100644
--- a/opensaml-saml-impl/src/main/resources/templates/metadata/EntityDescriptor.vm
+++ b/opensaml-saml-impl/src/main/resources/templates/metadata/EntityDescriptor.vm
@@ -2,12 +2,21 @@
 
 #if ($params.IDPSSODescriptor)
 #parse("$params.templatePath/IDPSSODescriptor.vm")
+
 #end
 #if ($params.AttributeAuthorityDescriptor)
 #parse("$params.templatePath/AttributeAuthorityDescriptor.vm")
+
 #end
 #if ($params.SPSSODescriptor)
 #parse("$params.templatePath/SPSSODescriptor.vm")
-#end
 
+#end
+#if ($params.organizationName || $params.organizationURL)
+    <md:Organization>
+        <md:OrganizationName#if ($params.lang) xml:lang="$params.lang"#end>$params.organizationName</md:OrganizationName>
+        <md:OrganizationDisplayName#if ($params.lang) xml:lang="$params.lang"#end>$params.organizationName</md:OrganizationDisplayName>
+        <md:OrganizationURL#if ($params.lang) xml:lang="$params.lang"#end>$params.organizationURL</md:OrganizationURL>
+    </md:Organization>
+#end
 </md:EntityDescriptor>
diff --git a/opensaml-saml-impl/src/main/resources/templates/metadata/SPSSODescriptor.vm b/opensaml-saml-impl/src/main/resources/templates/metadata/SPSSODescriptor.vm
index 510a09cbf..477f53794 100644
--- a/opensaml-saml-impl/src/main/resources/templates/metadata/SPSSODescriptor.vm
+++ b/opensaml-saml-impl/src/main/resources/templates/metadata/SPSSODescriptor.vm
@@ -1,5 +1,5 @@
 #set ($role = $params.SPSSODescriptor)
-    <md:SPSSODescriptor protocolSupportEnumeration="#foreach($p in $role.supportedProtocols)$p#if(!$foreach.last) #end#end">
+    <md:SPSSODescriptor #if ($role.wantAssertionsSigned)WantAssertionsSigned="true" #{end}protocolSupportEnumeration="#foreach($p in $role.supportedProtocols)$p#if(!$foreach.last) #end#end">
 #parse("$params.templatePath/KeyDescriptors.vm")
 #foreach ($endpoint in $role.artifactResolutionServices)
         <md:ArtifactResolutionService index="$endpoint.index" Binding="$endpoint.binding" Location="$endpoint.location" />
@@ -7,6 +7,9 @@
 #foreach ($endpoint in $role.singleLogoutServices)
         <md:SingleLogoutService Binding="$endpoint.binding" Location="$endpoint.location" />
 #end
+#foreach ($format in $role.nameIDFormats)
+        <md:NameIDFormat>$format.URI</md:NameIDFormat>
+#end
 #foreach ($endpoint in $role.assertionConsumerServices)
         <md:AssertionConsumerService index="$endpoint.index" Binding="$endpoint.binding" Location="$endpoint.location" />
 #end

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list