Here's one for AD, and it also use abstract beans just for fun:

        <bean id="abstractAttributeRepository"
class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao"
abstract="true">
                <property name="queryAttributeMapping">
                        <map>
                                <entry key="username" value="sAMAccountName"
/>
                        </map>
                </property>
                <property name="resultAttributeMapping">
                        <map>
                                <entry key="givenName" value="givenName"/>
                                <entry key="distinguishedName"
value="distinguishedName" />
                                <entry key="mail" value="mail" />
                                <entry key="employeeID" value="employeeID"
/>
                                <entry key="displayName" value="displayName"
/>
                                <entry key="sn" value="sn" />
                                <entry key="description" value="description"
/>
                        </map>
                </property>
        </bean>

        <bean id="studentAttributeRepository"
parent="abstractAttributeRepository"
                p:baseDN="ou=Users,dc=student,dc=ad,dc=university,dc=edu"
                p:contextSource-ref="contextSourceSTUDENT" />




On Wed, Oct 21, 2009 at 9:43 AM, Marvin Addison <[email protected]>wrote:

> > I am not sure if it is the "right" configuration, but it seems to work...
> >
> > <bean id="attributeRepository"
> >
> > class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
> >               <property name="baseDN" value="ou=people,dc=X,dc=Y" />
> >               <property name="contextSource" ref="contextSource"/>
> >               <property name="queryTemplate" value="{0}"/>
> >
> >               <property name="queryAttributeMapping">
> >                       <map>
> >                               <entry key="username" value="uid"/>
> >                       </map>
> >               </property>
> >
> >               <property name="resultAttributeMapping">
> >                       <map>
> >                               <entry key="ldapAttribute"
> > value="applicationAttribute"/>
> >                       </map>
> >               </property>
> >       </bean>
> >
> > Hope it helps
>
> Actually, that helped signficantly.  Stepping through a unit test was
> leading me to realize that "username" is the default key in the query
> part.  In any case I got it working and I'll update the Attributes
> page with this info.  Hopefully a brave soul can figure out how the
> JDBC DAO has changed and provide an example of it as well.
>
> M
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to