[java-identity-provider COMMIT] /trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttribut...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jun 18 11:48:26 EDT 2014
Author: scantor
Date: Wed Jun 18 11:48:26 2014
New Revision: 6110
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6110&view=rev
Log:
Support configuring attribute IDs while resolving attributes.
Modified:
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java?rev=6110&r1=6109&r2=6110&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java Wed Jun 18 11:48:26 2014
@@ -17,6 +17,9 @@
package net.shibboleth.idp.profile.impl;
+import java.util.Collection;
+import java.util.Collections;
+
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -33,8 +36,10 @@
import net.shibboleth.idp.relyingparty.RelyingPartyConfiguration;
import net.shibboleth.idp.service.ReloadableService;
import net.shibboleth.idp.service.ServiceableComponent;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.StringSupport;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.profile.action.ActionSupport;
@@ -66,18 +71,21 @@
/**
* Strategy used to locate the {@link RelyingPartyContext} associated with a given {@link ProfileRequestContext}.
*/
- @Nonnull private Function<ProfileRequestContext, RelyingPartyContext> relyingPartyContextLookupStrategy;
+ @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
/**
* Strategy used to locate the {@link SubjectContext} associated with a given {@link ProfileRequestContext}.
*/
- @Nonnull private Function<ProfileRequestContext, SubjectContext> subjectContextLookupStrategy;
+ @Nonnull private Function<ProfileRequestContext,SubjectContext> subjectContextLookupStrategy;
/**
* Strategy used to locate the {@link AuthenticationContext} associated with a given {@link ProfileRequestContext}.
*/
- @Nonnull private Function<ProfileRequestContext, AuthenticationContext> authnContextLookupStrategy;
-
+ @Nonnull private Function<ProfileRequestContext,AuthenticationContext> authnContextLookupStrategy;
+
+ /** Attribute IDs to pass into resolver. */
+ @Nonnull @NonnullElements private Collection<String> attributesToResolve;
+
/** RelyingPartyContext to operate on. */
@Nullable private RelyingPartyContext rpContext;
@@ -98,6 +106,7 @@
relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class, false);
subjectContextLookupStrategy = new ChildContextLookup<>(SubjectContext.class, false);
authnContextLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class, false);
+ attributesToResolve = Collections.emptyList();
}
/**
@@ -108,7 +117,7 @@
* {@link ProfileRequestContext}
*/
public void setRelyingPartyContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext, RelyingPartyContext> strategy) {
+ @Nonnull final Function<ProfileRequestContext,RelyingPartyContext> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
relyingPartyContextLookupStrategy =
@@ -122,7 +131,7 @@
* {@link ProfileRequestContext}
*/
public void setSubjectContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext, SubjectContext> strategy) {
+ @Nonnull final Function<ProfileRequestContext,SubjectContext> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
subjectContextLookupStrategy = Constraint.isNotNull(strategy, "SubjectContext lookup strategy cannot be null");
@@ -136,11 +145,23 @@
* {@link ProfileRequestContext}
*/
public void setAuthenticationContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext, AuthenticationContext> strategy) {
+ @Nonnull final Function<ProfileRequestContext,AuthenticationContext> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
authnContextLookupStrategy =
Constraint.isNotNull(strategy, "AuthenticationContext lookup strategy cannot be null");
+ }
+
+ /**
+ * Set the attribute IDs to pass into the resolver.
+ *
+ * @param attributeIds attribute ID collection
+ */
[... 22 lines stripped ...]
More information about the commits
mailing list