Skip to content

Commit f7a0ef8

Browse files
author
eugenp
committed
digest config work
1 parent 10cff43 commit f7a0ef8

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

spring-security-digest-auth/src/main/resources/webSecurityConfig.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@
77

88
<http pattern="/securityNone" security="none" />
99

10-
<http use-expressions="true">
10+
<http use-expressions="true" entry-point-ref="digestEntryPoint">
1111
<intercept-url pattern="/**" access="isAuthenticated()" />
1212

13-
<http-basic entry-point-ref="myBasicAuthenticationEntryPoint" />
14-
13+
<custom-filter ref="digestFilter" after="BASIC_AUTH_FILTER" />
1514
</http>
1615

16+
<beans:bean id="digestFilter"
17+
class="org.springframework.security.web.authentication.www.DigestAuthenticationFilter">
18+
<beans:property name="userDetailsService" ref="userService" />
19+
<beans:property name="authenticationEntryPoint" ref="digestEntryPoint" />
20+
</beans:bean>
21+
<beans:bean id="digestEntryPoint"
22+
class="org.springframework.security.web.authentication.www.DigestAuthenticationEntryPoint">
23+
<beans:property name="realmName"
24+
value="Contacts Realm via Digest Authentication" />
25+
<beans:property name="key" value="acegi" />
26+
</beans:bean>
27+
1728
<authentication-manager>
1829
<authentication-provider>
19-
<user-service>
30+
<user-service id="userService">
2031
<user name="user1" password="user1Pass" authorities="ROLE_USER" />
2132
</user-service>
2233
</authentication-provider>

0 commit comments

Comments
 (0)