Replace javadoc with SecurityFilterChain bean definition
This commit is contained in:
committed by
Marcus Da Coregio
parent
626e53d121
commit
f39f215140
+5
-4
@@ -49,10 +49,11 @@ import org.springframework.util.Assert;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* protected void configure(HttpSecurity http) throws Exception {
|
* @Bean
|
||||||
* http.apply(new UrlAuthorizationConfigurer<HttpSecurity>()).getRegistry()
|
* public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
|
||||||
* .antMatchers("/users**", "/sessions/**").hasRole("USER")
|
* http.apply(new UrlAuthorizationConfigurer<HttpSecurity>(context)).getRegistry()
|
||||||
* .antMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
* .requestMatchers("/users**", "/sessions/**").hasRole("USER")
|
||||||
|
* .requestMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user