22 lines
1.1 KiB
XML
22 lines
1.1 KiB
XML
|
|
<?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/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
||
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||
|
|
|
||
|
|
<security:authentication-manager>
|
||
|
|
<security:authentication-provider>
|
||
|
|
<security:user-service>
|
||
|
|
<security:user name="john" password="{noop}123" authorities="ROLE_USER" />
|
||
|
|
</security:user-service>
|
||
|
|
</security:authentication-provider>
|
||
|
|
</security:authentication-manager>
|
||
|
|
|
||
|
|
<security:http>
|
||
|
|
<security:form-login/>
|
||
|
|
<security:intercept-url pattern="/login" access="permitAll()" />
|
||
|
|
<security:intercept-url pattern="/foos/**" access="hasIpAddress('11.11.11.11')" />
|
||
|
|
<security:intercept-url pattern="/**" access="isAuthenticated()" />
|
||
|
|
</security:http>
|
||
|
|
</beans>
|