update
This commit is contained in:
@@ -34,12 +34,11 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers("/auth/register").permitAll()
|
.antMatchers("/auth/register").permitAll()
|
||||||
.antMatchers("/users").authenticated()
|
.antMatchers("/users").authenticated()
|
||||||
.antMatchers("/articles").permitAll()
|
.antMatchers("/articles").permitAll()
|
||||||
.antMatchers("/me").authenticated()
|
.antMatchers("/me/**").hasRole("USER")
|
||||||
.and()
|
.and()
|
||||||
.formLogin().disable()
|
.formLogin().disable()
|
||||||
.addFilter(jwtAuthenticationFilter())
|
.addFilter(jwtAuthenticationFilter())
|
||||||
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
|
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
Reference in New Issue
Block a user