...
on utilise des variable d'environnement pour le ldap (esup.ldap.url, esup.ldap.baseDN, ...)
uportal-war/src/main/resources/properties/contexts/ldapContext.xml
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/resources/properties/contexts/ldapContext.xml b/uportal-war/src/main/resources/properties/contexts/ldapContext.xml index 5e7d32a..ceedd74 100644 --- a/uportal-war/src/main/resources/properties/contexts/ldapContext.xml +++ b/uportal-war/src/main/resources/properties/contexts/ldapContext.xml @@ -68,4 +68,11 @@ <property name="pooled" value="false"/> </bean> --> + <bean id="defaultLdapContext"> + <property name="url" value="${esup.ldap.url}"/> + <property name="base" value="${esup.ldap.baseDN}"/> + <property name="userName" value="${esup.ldap.bindDN}"/> + <property name="password" value="${esup.ldap.bindPasswd}"/> + <property name="pooled" value="${esup.ldap.pooled}"/> + </bean> </beans> |
uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml b/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml index 6e69675..1832d85 100644 --- a/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml +++ b/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml @@ -137,10 +137,51 @@ --> <ref bean="uPortalAccountUserSource" /> <ref bean="uPortalJdbcUserSource" /> + <ref bean="uPortalLdapAttributeSource"/> </list> </property> </bean> + <bean id="uPortalLdapAttributeSource"> + <property name="contextSource" ref="defaultLdapContext" /> + <property name="baseDN" value="${esup.ldap.baseDN}" /> + <property name="queryAttributeMapping"> + <map> + <entry key="username" value="uid"/> + </map> + </property> + + <property name="resultAttributeMapping"> + <map> + <entry key="eduPersonPrimaryAffiliation"> <value>eduPersonPrimaryAffiliation</value></entry> + <entry key="eduPersonAffiliation"> <value>eduPersonAffiliation</value></entry> + <entry key="cn"> <value>cn</value></entry> + <entry key="description"> <value>description</value></entry> + <entry key="displayName"> <value>displayName</value></entry> + <entry key="facsimileTelephoneNumber"> <value>facsimileTelephoneNumber</value></entry> + <entry key="givenName"> <value>givenName</value></entry> + <entry key="mail"> <value>mail</value></entry> + <entry key="postalAddress"> <value>postalAddress</value></entry> + <entry key="sn"> <value>sn</value></entry> + <entry key="telephoneNumber"> <value>telephoneNumber</value></entry> + <entry key="uid"> + <set> + <value>uid</value> + <value>username</value> + <value>user.login.id</value> + </set> + </entry> + <entry key="supannCodeINE"> <value>supannCodeINE</value></entry> + <entry key="supannEtuId"> <value>supannEtuId</value></entry> + <entry key="supannEmpId"> <value>supannEmpId</value></entry> + <entry key="eduPersonAffiliation"> <value>eduPersonAffiliation</value></entry> + <entry key="supannaffectation"> <value>supannaffectation</value></entry> + <entry key="objectclass"> <value>objectclass</value></entry> + <entry key="supannorganisme"> <value>supannorganisme</value></entry> + </map> + </property> + </bean> + <bean id="uPortalAccountUserSource"> <property name="localAccountDao" ref="localAccountDao"/> <property name="usernameAttributeProvider" ref="usernameAttributeProvider" /> |
...