Replace javadoc with SecurityFilterChain bean definition

This commit is contained in:
Mitja Kotnik 2022-11-23 20:32:55 +01:00 committed by Marcus Da Coregio
parent 626e53d121
commit f39f215140

View File

@ -49,10 +49,11 @@ import org.springframework.util.Assert;
* </p> * </p>
* *
* <pre> * <pre>
* protected void configure(HttpSecurity http) throws Exception { * &#64;Bean
* http.apply(new UrlAuthorizationConfigurer&lt;HttpSecurity&gt;()).getRegistry() * public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
* .antMatchers(&quot;/users**&quot;, &quot;/sessions/**&quot;).hasRole(&quot;USER&quot;) * http.apply(new UrlAuthorizationConfigurer&lt;HttpSecurity&gt;(context)).getRegistry()
* .antMatchers(&quot;/signup&quot;).hasRole(&quot;ANONYMOUS&quot;).anyRequest().hasRole(&quot;USER&quot;); * .requestMatchers(&quot;/users**&quot;, &quot;/sessions/**&quot;).hasRole(&quot;USER&quot;)
* .requestMatchers(&quot;/signup&quot;).hasRole(&quot;ANONYMOUS&quot;).anyRequest().hasRole(&quot;USER&quot;);
* } * }
* </pre> * </pre>
* *