security work

This commit is contained in:
eugenp 2013-08-04 00:59:50 +03:00
parent b3c957773f
commit 98ad7671b5
2 changed files with 11 additions and 4 deletions

View File

@ -4,5 +4,3 @@
### Relevant Articles: ### Relevant Articles:
- [RestTemplate with Basic Authentication in Spring](http://www.baeldung.com/2012/04/16/how-to-use-resttemplate-with-basic-authentication-in-spring-3-1)
- [HttpClient Timeout](http://www.baeldung.com/httpclient-timeout)

View File

@ -6,10 +6,19 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
<http create-session="stateless" use-expressions="true"> <beans:bean id="digestFilter">
<beans:property name="userDetailsService" ref="userService" />
<beans:property name="authenticationEntryPoint" ref="digestEntryPoint" />
</beans:bean>
<beans:bean id="digestEntryPoint">
<beans:property name="realmName" value="Contacts Realm via Digest Authentication" />
<beans:property name="key" value="acegi" />
</beans:bean>
<http-basic /> <http use-expressions="true" create-session="stateless" entry-point-ref="digestEntryPoint">
<intercept-url pattern="/**" access="isAuthenticated()" />
<custom-filter ref="digestFilter" after="BASIC_AUTH_FILTER" />
</http> </http>
<authentication-manager> <authentication-manager>