From db5df68fe5afc540afe0f3fb01c9e1bf941c5f1c Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Fri, 18 Feb 2022 10:51:01 -0300 Subject: [PATCH] Adding other methods to public access --- .../wpdauth/security/WebSecurityConfig.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java b/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java index 3193244..cd85634 100644 --- a/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java +++ b/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java @@ -36,11 +36,13 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers("/users/login").permitAll()// .antMatchers("/users/signup").permitAll()// .antMatchers("/users/existsByUsername").permitAll()// - .antMatchers("/users/existsByNickname").permitAll()// + .antMatchers("/users/existsByNickname").permitAll()// + .antMatchers("/forgotpasswords/findallforgotpasswordquestions").permitAll()// + .antMatchers("/forgotpasswords/loginbyusernameandanswers").permitAll()// .antMatchers("/h2-console/**/**").permitAll() // Disallow everything else.. - .anyRequest().authenticated(); - + .anyRequest().authenticated(); + // If a user try to access a resource without having enough permissions http.exceptionHandling().accessDeniedPage("/login");