[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPart...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Aug 1 11:51:57 EDT 2015
Author: rdw
Date: Sat Aug 1 11:51:56 2015
New Revision: 7664
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7664&view=rev
Log:
IDP-768 Allow shibboleth.Conditions.RelyingPartyId to take a simple string
https://issues.shibboleth.net/jira/browse/IDP-768
Add a constructor which takes a String parameter (called "candidate") being a single relying party.
This forces spring to do the right thing when a string is passed.
Add tests to ensure this doesn't regress
Added:
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/logic/
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/logic/RelyingPartyIdPredicateTest.java (with props)
trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/logic/
trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/logic/relyingPartyIdPredicates.xml (with props)
Modified:
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPartyIdPredicate.java
Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPartyIdPredicate.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPartyIdPredicate.java?rev=7664&r1=7663&r2=7664&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPartyIdPredicate.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/logic/RelyingPartyIdPredicate.java Sat Aug 1 11:51:56 2015
@@ -18,6 +18,7 @@
package net.shibboleth.idp.profile.logic;
import java.util.Collection;
+import java.util.Collections;
import javax.annotation.Nonnull;
@@ -49,6 +50,15 @@
/**
* Constructor.
*
+ * @param candidate a single value to check against
+ */
+ public RelyingPartyIdPredicate(@Nonnull @NonnullElements final String candidate) {
+ this(Collections.singleton(candidate));
+ }
+
+ /**
+ * Constructor.
+ *
* @param pred generalized predicate
*/
public RelyingPartyIdPredicate(@Nonnull final Predicate<String> pred) {
More information about the commits
mailing list