[java-plugin-shibd-saml] branch main updated: Add new property to SP profile config.
Scott Cantor
cantor.2 at osu.edu
Mon Feb 17 20:44:00 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd-saml.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd-saml.git;a=commit;h=5c56d4f414976608746c7e0dea9343347b092635
The following commit(s) were added to refs/heads/main by this push:
new 5c56d4f Add new property to SP profile config.
5c56d4f is described below
commit 5c56d4f414976608746c7e0dea9343347b092635
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 17 15:43:57 2025 -0500
Add new property to SP profile config.
---
.../impl/BrowserSSOProfileConfiguration.java | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
index a7c40fe..14e4be4 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
@@ -50,6 +50,9 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionConsum
/** Whether attributes should be resolved in the course of the profile. */
@Nonnull private Predicate<ProfileRequestContext> resolveAttributesPredicate;
+ /** Lookup strategy for attribute recipient group ID. */
+ @Nonnull private Function<ProfileRequestContext,String> attributeRecipientGroupIDLookupStrategy;
+
/** Whether to mandate forced authentication for the request. */
@Nonnull private Predicate<ProfileRequestContext> forceAuthnPredicate;
@@ -107,6 +110,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionConsum
super(profileId);
setEncryptNameIDs(true);
resolveAttributesPredicate = PredicateSupport.alwaysFalse();
+ attributeRecipientGroupIDLookupStrategy = FunctionSupport.constant(null);
forceAuthnPredicate = PredicateSupport.alwaysFalse();
checkAddressPredicate = PredicateSupport.alwaysTrue();
maximumTimeSinceAuthnLookupStrategy = FunctionSupport.constant(null);
@@ -146,6 +150,31 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionConsum
resolveAttributesPredicate = Constraint.isNotNull(condition, "Resolve attributes predicate cannot be null");
}
+ /** {@inheritDoc} */
+ @Nullable public String getAttributeRecipientGroupID(@Nullable final ProfileRequestContext profileRequestContext) {
+ return attributeRecipientGroupIDLookupStrategy.apply(profileRequestContext);
+ }
+
+ /**
+ * Set the group of services for which attributes are being resolved.
+ *
+ * @param groupID group identifier
+ */
+ public void setAttributeRecipientGroupID(@Nullable final String groupID) {
+ attributeRecipientGroupIDLookupStrategy = FunctionSupport.constant(groupID);
+ }
+
+ /**
+ * Set the lookup strategy for the group of services for which attributes are being resolved.
+ *
+ * @param strategy lookup strategy
+ */
+ public void setAttributeRecipientGroupIDLookupStrategy(
+ @Nonnull final Function<ProfileRequestContext,String> strategy) {
+ attributeRecipientGroupIDLookupStrategy =
+ Constraint.isNotNull(strategy, "Group ID lookup strategy cannot be null");
+ }
+
/** {@inheritDoc} */
public boolean isForceAuthn(@Nullable final ProfileRequestContext profileRequestContext) {
return forceAuthnPredicate.test(profileRequestContext);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list