Přidána podpora pro přihlašování proti Active Directory, loginem shodným
s uživatelem a heslem do windows domény. Původní LDAP přihlašování funguje proti obecnému LDAP serveu- bind na LDAP dělá přes CN uživatele.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ad.domain=bukova.net
|
||||
ad.ldapUrl=ldap://192.168.25.110/
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
|
||||
|
||||
<security:authentication-manager>
|
||||
<security:authentication-provider ref="adAuthProvider"/>
|
||||
</security:authentication-manager>
|
||||
|
||||
<bean id="adAuthProvider" class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
|
||||
<constructor-arg name="domain" value="${ad.domain}"/>
|
||||
<constructor-arg name="url" value="${ad.ldapUrl}"/>
|
||||
<property name="userDetailsContextMapper" ref="adUserMapper"/>
|
||||
</bean>
|
||||
|
||||
<bean id="adUserMapper" class="info.bukova.isspst.services.users.AdUserCtxMapper">
|
||||
<constructor-arg name="userService" ref="userService"/>
|
||||
<constructor-arg name="roleService" ref="roleService"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -28,6 +28,7 @@
|
||||
<value>/WEB-INF/ldap.properties</value>
|
||||
<value>/WEB-INF/mail.properties</value>
|
||||
<value>/WEB-INF/gmail.properties</value>
|
||||
<value>/WEB-INF/ad.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
@@ -137,9 +138,11 @@
|
||||
<security:logout invalidate-session="true"/>
|
||||
</security:http>
|
||||
|
||||
<!-- Authentication methods -->
|
||||
<import resource="database-auth.xml"/>
|
||||
<!-- <import resource="ldap-auth.xml"/>
|
||||
<import resource="ad-auth.xml"/> -->
|
||||
<import resource="gmail-auth.xml"/>
|
||||
<!-- <import resource="ldap-auth.xml"/> -->
|
||||
|
||||
<import resource="mail-services.xml"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user