[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filte...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jun 6 05:33:00 EDT 2013
Author: rdw
Date: Thu Jun 6 05:33:00 2013
New Revision: 4523
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4523&view=rev
Log:
IDP-208 AttributeRequesterNameIDFormatExactMatchFunctor and AttributeIssuerNameIDFormatExactMatchFunctor and tests
Added:
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractNameIDFormatSupportedMatcher.java (with props)
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AttributeIssuerNameIDFormatExactMatcher.java (with props)
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AttributeRequesterNameIDFormatExactMatcher.java (with props)
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/AttributeIssuerNameIDFormatExactMatcherTest.java (with props)
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/AttributeRequesterNameIDFormatExactMatcherTest.java (with props)
Modified:
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractEntityAttributeMatcher.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/BaseMetadataTests.java
trunk/idp-attribute-filter-impl/src/test/resources/data/net/shibboleth/idp/filter/impl/saml/shibboleth.net-metadata.xml
trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/AttributeRecipientContext.java
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractEntityAttributeMatcher.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractEntityAttributeMatcher.java?rev=4523&r1=4522&r2=4523&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractEntityAttributeMatcher.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/saml/AbstractEntityAttributeMatcher.java Thu Jun 6 05:33:00 2013
@@ -19,11 +19,13 @@
import java.util.List;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.shibboleth.idp.attribute.filter.AttributeFilterContext;
import net.shibboleth.idp.attribute.filter.MatcherException;
import net.shibboleth.idp.attribute.filter.impl.matcher.AbstractComparisonMatcher;
+import net.shibboleth.utilities.java.support.logic.Constraint;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import org.opensaml.core.xml.XMLObject;
@@ -107,7 +109,8 @@
*
* @return true if the entity has the configured attribute, false otherwise
*/
- protected boolean hasEntityAttribute(AttributeFilterContext filterContext) {
+ protected boolean hasEntityAttribute(@Nonnull AttributeFilterContext filterContext) {
+ Constraint.isNotNull(filterContext, "Context must be supplied");
EntityDescriptor entityDescriptor = getEntityMetadata(filterContext);
if (entityDescriptor == null) {
throw new MatcherException(getLogPrefix() + " No metadata available for the entity");
Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/BaseMetadataTests.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/BaseMetadataTests.java?rev=4523&r1=4522&r2=4523&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/BaseMetadataTests.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/saml/BaseMetadataTests.java Thu Jun 6 05:33:00 2013
@@ -76,10 +76,12 @@
recipientContext.setPrincipal(principal);
if (null != idp) {
recipientContext.setAttributeIssuerID(idp.getEntityID());
+ recipientContext.setAttributeIssuerRoleDescriptor(idp.getIDPSSODescriptor("urn:oasis:names:tc:SAML:2.0:protocol"));
}
recipientContext.setAttributeIssuerMetadata(idp);
if (null != sp) {
recipientContext.setAttributeRecipientID(sp.getEntityID());
+ recipientContext.setAttributeRequesterRoleDescriptor(sp.getSPSSODescriptor("urn:oasis:names:tc:SAML:2.0:protocol"));
}
recipientContext.setAttributeRecipientMetadata(sp);
resolutionContext.addSubcontext(recipientContext);
Modified: trunk/idp-attribute-filter-impl/src/test/resources/data/net/shibboleth/idp/filter/impl/saml/shibboleth.net-metadata.xml
[... 116 lines stripped ...]
More information about the commits
mailing list