All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.smallmind.nutsnbolts.realm.xml Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="ldapRealm" class="org.smallmind.nutsnbolts.shiro.realm.spring.LdapRealmFactoryBean">
    <property name="realmClass" value="${security.provider}"/>
    <property name="connectionDetails">
      <bean class="org.smallmind.nutsnbolts.shiro.realm.LdapConnectionDetails">
        <property name="userName" value="${ldap.user}"/>
        <property name="password" value="${ldap.password}"/>
        <property name="host" value="${ldap.host}"/>
        <property name="port" value="${ldap.port}"/>
        <property name="rootNamespace" value="${ldap.root}"/>
      </bean>
    </property>
    <property name="searchPath" value="${ldap.auth.search_path}"/>
  </bean>

  <bean id="securityManager" class="org.apache.shiro.mgt.DefaultSecurityManager">
    <property name="realm" ref="ldapRealm"/>
  </bean>

  <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>

  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <property name="staticMethod" value="org.apache.shiro.SecurityUtils.setSecurityManager"/>
    <property name="arguments" ref="securityManager"/>
  </bean>

</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy