Skip to content

Commit

Permalink
Minor code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vvaadd authored May 10, 2024
1 parent acc96f1 commit 2f7768b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Java::
@Autowired
UserDetailsService userDetailsService;
DigestAuthenticationEntryPoint entryPoint() {
DigestAuthenticationEntryPoint authenticationEntryPoint() {
DigestAuthenticationEntryPoint result = new DigestAuthenticationEntryPoint();
result.setRealmName("My App Realm");
result.setKey("3028472b-da34-4501-bfd8-a355c42bdf92");
Expand All @@ -55,15 +55,15 @@ DigestAuthenticationEntryPoint entryPoint() {
DigestAuthenticationFilter digestAuthenticationFilter() {
DigestAuthenticationFilter result = new DigestAuthenticationFilter();
result.setUserDetailsService(userDetailsService);
result.setAuthenticationEntryPoint(entryPoint());
result.setAuthenticationEntryPoint(authenticationEntryPoint());
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
// ...
.exceptionHandling(e -> e.authenticationEntryPoint(authenticationEntryPoint()))
.addFilterBefore(digestFilter());
.addFilterAfter(digestAuthenticationFilter(), ExceptionTranslationFilter.class);
return http.build();
}
----
Expand Down

0 comments on commit 2f7768b

Please sign in to comment.