You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by wasalto <wa...@hotmail.com> on 2011/08/05 16:58:13 UTC
What is the configuration for ldap authentication with spring
Hi,
How should I indicate the url for my ldap server ?
Here is the beans I have in my applicationContext concerning ldap:
<bean id="securityManager"
class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="myLdapRealm" />
<property name="sessionMode" value="native" />
</bean>
<bean id="myLdapRealm" class="org.apache.shiro.realm.ldap.JndiLdapRealm">
<property name="url"
value="ldap://localhost:10389/dc=jbcppets,dc=com"/>
<property name="userDnTemplate"
value="uid={0},ou=Groups,dc=jbcppets,dc=com" />
</bean>
--
View this message in context: http://shiro-user.582556.n2.nabble.com/What-is-the-configuration-for-ldap-authentication-with-spring-tp6656846p6656846.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: What is the configuration for ldap authentication with spring
Posted by Les Hazlewood <lh...@apache.org>.
Hi Wasalto,
Thanks for posting your answer - I'm sure this would help someone in the future!
Cheers,
Les
Re: What is the configuration for ldap authentication with spring
Posted by wasalto <wa...@hotmail.com>.
I've found out. Here it is:
<bean id="securityManager"
class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="myLdapRealm" />
<property name="sessionMode" value="native" />
</bean>
<bean id="myLdapRealm" class="org.apache.shiro.realm.ldap.JndiLdapRealm">
<property name="userDnTemplate"
value="uid={0},ou=Users,dc=jbcppets,dc=com" />
<property name="contextFactory" ref="myContextFactory"/>
</bean>
<bean id="myContextFactory"
class="org.apache.shiro.realm.ldap.JndiLdapContextFactory">
<property name="url"
value="ldap://localhost:10389/dc=jbcppets,dc=com"/>
</bean>
--
View this message in context: http://shiro-user.582556.n2.nabble.com/What-is-the-configuration-for-ldap-authentication-with-spring-tp6656846p6663559.html
Sent from the Shiro User mailing list archive at Nabble.com.