Some formatting fixes for HttpSecurity Javadoc

This commit is contained in:
Rob Winch 2016-03-09 16:45:43 -06:00
parent 2f4610e8b7
commit be36ddb614

View File

@ -1051,13 +1051,21 @@ public final class HttpSecurity extends
* *
* @Override * @Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http.requestMatchers().antMatchers("/api/**", "/oauth/**").and() * http
* .authorizeRequests().antMatchers("/**").hasRole("USER").and().httpBasic(); * .requestMatchers()
* .antMatchers("/api/**", "/oauth/**")
* .and()
* .authorizeRequests()
* .antMatchers("/**").hasRole("USER")
* .and()
* .httpBasic();
* } * }
* *
* @Override * @Override
* protected void configure(AuthenticationManagerBuilder auth) throws Exception { * protected void configure(AuthenticationManagerBuilder auth) throws Exception {
* auth.inMemoryAuthentication().withUser("user").password("password").roles("USER"); * auth
* .inMemoryAuthentication()
* .withUser("user").password("password").roles("USER");
* } * }
* } * }
* </pre> * </pre>
@ -1071,13 +1079,22 @@ public final class HttpSecurity extends
* *
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http.requestMatchers().antMatchers(&quot;/api/**&quot;).antMatchers(&quot;/oauth/**&quot;).and() * http
* .authorizeRequests().antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;).and().httpBasic(); * .requestMatchers()
* .antMatchers(&quot;/api/**&quot;)
* .antMatchers(&quot;/oauth/**&quot;)
* .and()
* .authorizeRequests()
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* .and()
* .httpBasic();
* } * }
* *
* &#064;Override * &#064;Override
* protected void configure(AuthenticationManagerBuilder auth) throws Exception { * protected void configure(AuthenticationManagerBuilder auth) throws Exception {
* auth.inMemoryAuthentication().withUser(&quot;user&quot;).password(&quot;password&quot;).roles(&quot;USER&quot;); * auth
* .inMemoryAuthentication()
* .withUser(&quot;user&quot;).password(&quot;password&quot;).roles(&quot;USER&quot;);
* } * }
* } * }
* </pre> * </pre>
@ -1091,14 +1108,24 @@ public final class HttpSecurity extends
* *
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http.requestMatchers().antMatchers(&quot;/api/**&quot;).and().requestMatchers() * http
* .antMatchers(&quot;/oauth/**&quot;).and().authorizeRequests().antMatchers(&quot;/**&quot;) * .requestMatchers()
* .hasRole(&quot;USER&quot;).and().httpBasic(); * .antMatchers(&quot;/api/**&quot;)
* .and()
* .requestMatchers()
* .antMatchers(&quot;/oauth/**&quot;)
* .and()
* .authorizeRequests()
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* .and()
* .httpBasic();
* } * }
* *
* &#064;Override * &#064;Override
* protected void configure(AuthenticationManagerBuilder auth) throws Exception { * protected void configure(AuthenticationManagerBuilder auth) throws Exception {
* auth.inMemoryAuthentication().withUser(&quot;user&quot;).password(&quot;password&quot;).roles(&quot;USER&quot;); * auth
* .inMemoryAuthentication()
* .withUser(&quot;user&quot;).password(&quot;password&quot;).roles(&quot;USER&quot;);
* } * }
* } * }
* </pre> * </pre>