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
1 changed files with 85 additions and 58 deletions

View File

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