[java-identity-provider COMMIT] in /trunk/idp-attribute-resolver-impl/src: main/java/net/shibboleth/idp/attribute/res...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Feb 22 10:00:09 EST 2013
Author: rdw
Date: Fri Feb 22 10:00:09 2013
New Revision: 4287
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4287&view=rev
Log:
https://issues.shibboleth.net/jira/browse/IDP-204 https://issues.shibboleth.net/jira/browse/IDP-255
Move the principal, Attribute Issuer and Attribute Resolver into the resolution context
Modified:
trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnector.java
trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnectorTest.java
trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDStoreTest.java
Modified: trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnector.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnector.java?rev=4287&r1=4286&r2=4287&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnector.java (original)
+++ trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/StoredIDDataConnector.java Fri Feb 22 10:00:09 2013
@@ -35,7 +35,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.Function;
import com.google.common.base.Optional;
/**
@@ -62,14 +61,6 @@
/** Persistent identifier data store. */
private StoredIDStore pidStore;
- /** Strategy used to locate the local (idp) EntityId given a {@link AttributeResolutionContext}. */
- // TODO(rdw) These needs to be changed when the profile handling has been finalized. Name and Interface type?
- private Function<AttributeResolutionContext, String> localEntityIdStrategy;
-
- /** Strategy used to locate the Principal given a {@link AttributeResolutionContext}. */
- // TODO(rdw) These needs to be changed when the profile handling has been finalized. Name and Interface type?
- private Function<AttributeResolutionContext, String> principalStrategy;
-
/**
* Gets the {@link DataSource} used to communicate with the database.
*
@@ -115,44 +106,6 @@
public void setQueryTimeout(int timeout) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
queryTimeout = timeout;
- }
-
- /**
- * Gets the strategy for finding the local EntityId from the resolution context.
- *
- * @return the required strategy.
- */
- public Function<AttributeResolutionContext, String> getLocalEntityIdStrategy() {
- return localEntityIdStrategy;
- }
-
- /**
- * Sets the strategy for finding the RelyingPartyContext from the resolution context.
- *
- * @param strategy to set.
- */
- public void setPrincipalStrategy(Function<AttributeResolutionContext, String> strategy) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- principalStrategy = strategy;
- }
-
- /**
- * Gets the strategy for finding the local EntityId from the resolution context.
- *
- * @return the required strategy.
- */
- public Function<AttributeResolutionContext, String> getPrincipalStrategy() {
- return principalStrategy;
- }
-
- /**
- * Sets the strategy for finding the RelyingPartyContext from the resolution context.
- *
- * @param strategy to set.
- */
- public void setLocalEntityIdStrategy(Function<AttributeResolutionContext, String> strategy) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- localEntityIdStrategy = strategy;
}
/** {@inheritDoc} */
@@ -161,16 +114,6 @@
if (null == dataSource) {
throw new ComponentInitializationException("StoredIdConnector " + getId()
+ ": No database connection provided");
- }
-
- if (null == principalStrategy) {
- throw new ComponentInitializationException("StoredIdConnector " + getId()
- + ": No principal strategy provided");
- }
-
- if (null == localEntityIdStrategy) {
- throw new ComponentInitializationException("StoredIdConnector " + getId()
- + ": No local entity Id strategy provided ");
}
if (null != getSalt() && getSalt().length < 16) {
@@ -276,7 +219,7 @@
@Nonnull AttributeResolutionContext resolutionContext) throws AttributeResolutionException {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
- final String principal = StringSupport.trimOrNull(principalStrategy.apply(resolutionContext));
+ final String principal = StringSupport.trimOrNull(resolutionContext.getPrincipal());
[... 421 lines stripped ...]
More information about the commits
mailing list