[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 09:17:17 EST 2013


Author: rdw
Date: Fri Feb 22 09:17:17 2013
New Revision: 4284

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4284&view=rev
Log:
https://issues.shibboleth.net/jira/browse/IDP-13 https://issues.shibboleth.net/jira/browse/IDP-255
Move Attribute Issuer and Attribute recipient into resolution context

Modified:
    trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinition.java
    trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinitionTest.java

Modified: trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinition.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinition.java?rev=4284&r1=4283&r2=4284&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinition.java (original)
+++ trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/ad/SAML2NameIDAttributeDefinition.java Fri Feb 22 09:17:17 2013
@@ -70,22 +70,6 @@
     /** SP name qualifier for the NameID. */
     private String nameIdSPQualifier;
 
-    /** Strategy used to locate the RelyingParty EntityId given a {@link AttributeResolutionContext}. */
-    // TODO(rdw) These needs to be changed when the profile handling has been finalized
-    // TODO Do we mean IdP or RelyingParty or what? Fix when [...]
-    // the questions in https://wiki.shibboleth.net/confluence/display/OS30/Messaging+Abstractions+Discussion+Document
-    // are answered
-    // TODO should this be a org.opensaml.messaging.context.navigate.ContextDataLookupFunction ?
-    private Function<AttributeResolutionContext, String> spEntityIdStrategy;
-
-    /** Strategy used to locate the IdP EntityId given a {@link AttributeResolutionContext}. */
-    // TODO(rdw) These needs to be changed when the profile handling has been finalized
-    // TODO Do we mean IdP or RelyingParty or what? Fix when [...]
-    // the questions in https://wiki.shibboleth.net/confluence/display/OS30/Messaging+Abstractions+Discussion+Document
-    // are answered
-    // TODO should this be a org.opensaml.messaging.context.navigate.ContextDataLookupFunction ?
-    private Function<AttributeResolutionContext, String> idPEntityIdStrategy;
-
     /**
      * Constructor.
      */
@@ -153,59 +137,6 @@
     }
 
     /**
-     * Gets the strategy for finding the IdP EntityId from the resolution context.
-     * 
-     * @return the required strategy.
-     */
-    public Function<AttributeResolutionContext, String> getIdPEntityIdStrategy() {
-        return idPEntityIdStrategy;
-    }
-
-    /**
-     * Sets the strategy for finding the IdP EntityId from the resolution context.
-     * 
-     * @param strategy what to set
-     */
-    public void setIdPEntityIdStrategy(Function<AttributeResolutionContext, String> strategy) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-        idPEntityIdStrategy = strategy;
-    }
-
-    /**
-     * Gets the strategy for finding the RelyingParty EntityId from the resolution context.
-     * 
-     * @return the required strategy.
-     */
-    public Function<AttributeResolutionContext, String> getSPEntityIdStrategy() {
-        return spEntityIdStrategy;
-    }
-
-    /**
-     * Sets the strategy for finding the RelyingPartyContext from the resolution context.
-     * 
-     * @param strategy to set.
-     */
-    public void setSPEntityIdStrategy(Function<AttributeResolutionContext, String> strategy) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-        spEntityIdStrategy = strategy;
-    }
-
-    /** {@inheritDoc} */
-    protected void doInitialize() throws ComponentInitializationException {
-        super.doInitialize();
-
-        if (null == spEntityIdStrategy) {
-            throw new ComponentInitializationException("Attribute definition '" + getId()
-                    + "': no Relying Party EntityId Lookup Strategy set");
-        }
-
-        if (null == idPEntityIdStrategy) {
-            throw new ComponentInitializationException("Attribute definition '" + getId()
-                    + "': no IdP EntityId Lookup Strategy set");
-        }
-    }
-
-    /**
      * Builds a name ID. The provided value is the textual content of the NameID. The NameQualifier and SPNameQualifier
      * are set according to the configuration, or to the local and requesting entityIDs respectively.
      * 
@@ -220,9 +151,9 @@
 
         log.debug("NameIdAttribute {} : Building a SAML2 NameID with value for {}", getId(), nameIdValue);
 
-        final String spEntityId =

[... 184 lines stripped ...]


More information about the commits mailing list