Browse Source

Adding other methods to public access

main
GabrielTrettel 3 years ago
parent
commit
db5df68fe5
  1. 6
      src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java

6
src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java

@ -36,10 +36,12 @@ 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");

Loading…
Cancel
Save