argos/dmp-backend/src/main/webapp/WEB-INF/spring-security.xml

42 lines
1.3 KiB
XML
Raw Normal View History

<beans:beans
xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
<context:component-scan base-package="security.*" />
<http use-expressions="true" create-session="stateless" auto-config='true'>
<!-- Default to Spring MVC's CORS configuration -->
<cors />
2017-10-16 18:30:29 +02:00
<!-- disable csrf checks -->
<csrf disabled="true"/>
<custom-filter after="BASIC_AUTH_FILTER" ref="tokenAuthenticationFilter" />
2017-12-14 18:07:09 +01:00
<intercept-url pattern="/**" access="true" />
<http-basic/>
</http>
<authentication-manager>
<authentication-provider ref="customAuthenticationProvider" />
</authentication-manager>
<beans:bean id="tokenFilter" class="security.TokenAuthenticationFilter"/>
</beans:beans>