[java-identity-provider] branch main updated: Expose disallowedFeatures getter on base interface.

Scott Cantor cantor.2 at osu.edu
Fri Feb 3 18:40:23 UTC 2023


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

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

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=8662a7d92b17c117ca22cabe62a8530e8e0a8b53

The following commit(s) were added to refs/heads/main by this push:
     new 8662a7d92 Expose disallowedFeatures getter on base interface.
8662a7d92 is described below

commit 8662a7d92b17c117ca22cabe62a8530e8e0a8b53
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Feb 3 13:40:19 2023 -0500

    Expose disallowedFeatures getter on base interface.
---
 .../config/AbstractProfileConfiguration.java       | 22 ++++++----------------
 .../idp/profile/config/ProfileConfiguration.java   | 13 +++++++++++++
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java
index 7c2203e88..37816b302 100644
--- a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java
+++ b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java
@@ -18,7 +18,6 @@
 package net.shibboleth.idp.profile.config;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 import java.util.function.Function;
@@ -31,6 +30,7 @@ import net.shibboleth.shared.annotation.constraint.NonnullElements;
 import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.annotation.constraint.NotLive;
 import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent;
 import net.shibboleth.shared.logic.Constraint;
 import net.shibboleth.shared.logic.FunctionSupport;
@@ -103,9 +103,9 @@ public abstract class AbstractProfileConfiguration extends AbstractIdentifiableI
         @Nullable final ProfileRequestContext profileRequestContext) {
         final List<String> flows = inboundFlowsLookupStrategy.apply(profileRequestContext);
         if (flows != null) {
-            return List.copyOf(flows);
+            return CollectionSupport.copyToList(flows);
         }
-        return Collections.emptyList();
+        return CollectionSupport.emptyList();
     }
 
     /**
@@ -139,9 +139,9 @@ public abstract class AbstractProfileConfiguration extends AbstractIdentifiableI
             @Nullable final ProfileRequestContext profileRequestContext) {
         final List<String> flows = outboundFlowsLookupStrategy.apply(profileRequestContext);
         if (flows != null) {
-            return List.copyOf(flows);
+            return CollectionSupport.copyToList(flows);
         }
-        return Collections.emptyList();
+        return CollectionSupport.emptyList();
     }
 
     /**
@@ -184,17 +184,7 @@ public abstract class AbstractProfileConfiguration extends AbstractIdentifiableI
         return (getDisallowedFeatures(profileRequestContext) & feature) == feature;
     }
     
-    /**
-     * Get a bitmask of disallowed features to block.
-     * 
-     * <p>Individual profiles define their own feature constants.</p>
-     * 
-     * @param profileRequestContext current profile request context
-     * 
-     * @return bitmask of features to block
-     * 
-     * @since 3.3.0
-     */
+    /** {@inheritDoc} */
     public int getDisallowedFeatures(@Nullable final ProfileRequestContext profileRequestContext) {
         final Integer mask = disallowedFeaturesLookupStrategy.apply(profileRequestContext); 
         return mask != null ? mask : DEFAULT_DISALLOWED_FEATURES;
diff --git a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java
index 0f2339656..88d4b9db0 100644
--- a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java
+++ b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java
@@ -73,4 +73,17 @@ public interface ProfileConfiguration extends IdentifiedComponent {
     @Nullable SecurityConfiguration getSecurityConfiguration(
             @Nullable final ProfileRequestContext profileRequestContext);
     
+    /**
+     * Get a bitmask of disallowed features to block.
+     * 
+     * <p>Individual profiles define their own feature constants.</p>
+     * 
+     * @param profileRequestContext current profile request context
+     * 
+     * @return bitmask of features to block
+     * 
+     * @since 5.0.0
+     */
+    public int getDisallowedFeatures(@Nullable final ProfileRequestContext profileRequestContext);
+
 }
\ 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