+

Remove original attributeRepository bean and declared LDAP attributeRepository in UsernamePasswordCredentialsToPrincipalResolver

Benjamin Renard [2014-12-11 14:03:59]
Remove original attributeRepository bean and declared LDAP attributeRepository in UsernamePasswordCredentialsToPrincipalResolver
Filename
custom/webpages/WEB-INF/deployerConfigContext.xml
diff --git a/custom/webpages/WEB-INF/deployerConfigContext.xml b/custom/webpages/WEB-INF/deployerConfigContext.xml
index 0133cad..404478a 100644
--- a/custom/webpages/WEB-INF/deployerConfigContext.xml
+++ b/custom/webpages/WEB-INF/deployerConfigContext.xml
@@ -58,7 +58,9 @@
 					class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
 				-->
 				<bean
-					class="org.esupportail.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
+					class="org.esupportail.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver">
+					<property name="attributeRepository" ref="attributeRepository" />
+				</bean>

 				<!--
 					| HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials.  It supports the CAS 2.0 approach of
@@ -115,21 +117,6 @@
     </sec:user-service>

 	<!--
-	Bean that defines the attributes that a service may return.  This example uses the Stub/Mock version.  A real implementation
-	may go against a database or LDAP server.  The id should remain "attributeRepository" though.
-	 -->
-	<bean id="attributeRepository"
-		class="org.jasig.services.persondir.support.StubPersonAttributeDao">
-		<property name="backingMap">
-			<map>
-				<entry key="uid" value="uid" />
-				<entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
-				<entry key="groupMembership" value="groupMembership" />
-			</map>
-		</property>
-	</bean>
-
-	<!--
 	Sample, in-memory data store for the ServiceRegistry. A real implementation
 	would probably want to replace this with the JPA-backed ServiceRegistry DAO
 	The name of this bean should remain "serviceRegistryDao".
ViewGit