using Spring as the main structure, you can also use the XML context of the application to define spheres as:
<bean id="ldapRealm" class="org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm"> <property name="url" value="ldap:/ldapserver:389" /> </bean>
Then pass the scope to your Security Manager:
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> <property name="realm" ref="ldapRealm" /> </bean>
Then enter the login code wherever you want.
Kingz
source share