[java-plugin-shibd] branch main updated: Add a dedicated class and setter to handle bitmask generation.

Codeberg noreply at shibboleth.net
Wed Mar 4 16:07:50 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/2fce0e3cb52fb4ef6a3c4bbf1b649a19bf50cd3b

The following commit(s) were added to refs/heads/main by this push:
     new 2fce0e3  Add a dedicated class and setter to handle bitmask generation.
2fce0e3 is described below

commit 2fce0e3cb52fb4ef6a3c4bbf1b649a19bf50cd3b
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Mar 4 11:07:36 2026 -0500

    Add a dedicated class and setter to handle bitmask generation.
---
 .../AbstractConditionalProfileConfiguration.java   | 56 ++++++++++++++++++++++
 .../shibboleth/sp/profile/config/package-info.java | 18 +++++++
 2 files changed, 74 insertions(+)

diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/AbstractConditionalProfileConfiguration.java b/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/AbstractConditionalProfileConfiguration.java
new file mode 100644
index 0000000..2868a4e
--- /dev/null
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/AbstractConditionalProfileConfiguration.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.profile.config;
+
+import java.util.Set;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import net.shibboleth.shared.logic.FunctionSupport;
+
+/**
+ * An SP-specific subclass for all profile configurations that implements any logic not yet promoted back into our shared layer.
+ */
+public abstract class AbstractConditionalProfileConfiguration extends net.shibboleth.profile.config.AbstractConditionalProfileConfiguration {
+
+    /**
+     * Constructor.
+     *
+     * @param id profile ID
+     */
+    public AbstractConditionalProfileConfiguration(@Nonnull final String id) {
+        super(id);
+    }
+    
+    /**
+     * Sets a bitmask of disallowed features to block using discrete inputs to cover for Spring's
+     * lack of usable bitmasking support.
+     * 
+     * @param flags a set of flags to OR together
+     */
+    public void setDisallowedFeatures(@Nullable final Set<Integer> flags) {
+        int mask = 0;
+        
+        if (flags != null) {
+            for (final Integer flag : flags) {
+                mask |= flag;
+            }
+        }
+        
+        setDisallowedFeaturesLookupStrategy(FunctionSupport.constant(mask));
+    }
+    
+}
\ No newline at end of file
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/package-info.java b/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/package-info.java
new file mode 100644
index 0000000..4951cb0
--- /dev/null
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/profile/config/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Interfaces and classes for SP profile configuration use.
+ */
+package net.shibboleth.sp.profile.config;
\ 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