File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
docs/modules/ROOT/pages/servlet/authentication/passwords Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,26 @@ Java::
46
46
@Autowired
47
47
UserDetailsService userDetailsService;
48
48
49
- DigestAuthenticationEntryPoint entryPoint () {
49
+ DigestAuthenticationEntryPoint authenticationEntryPoint () {
50
50
DigestAuthenticationEntryPoint result = new DigestAuthenticationEntryPoint();
51
51
result.setRealmName("My App Realm");
52
52
result.setKey("3028472b-da34-4501-bfd8-a355c42bdf92");
53
+ return result;
53
54
}
54
55
55
56
DigestAuthenticationFilter digestAuthenticationFilter() {
56
57
DigestAuthenticationFilter result = new DigestAuthenticationFilter();
57
58
result.setUserDetailsService(userDetailsService);
58
- result.setAuthenticationEntryPoint(entryPoint());
59
+ result.setAuthenticationEntryPoint(authenticationEntryPoint());
60
+ return result;
59
61
}
60
62
61
63
@Bean
62
64
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
63
65
http
64
66
// ...
65
67
.exceptionHandling(e -> e.authenticationEntryPoint(authenticationEntryPoint()))
66
- .addFilterBefore(digestFilter ());
68
+ .addFilter(digestAuthenticationFilter ());
67
69
return http.build();
68
70
}
69
71
----
You can’t perform that action at this time.
0 commit comments