Replace < and > with &lt and &gt in Javadoc

Closes gh-9847
This commit is contained in:
Eleftheria Stein 2021-06-04 12:26:07 +03:00
parent 20751d2063
commit 204a32aba8
7 changed files with 99 additions and 99 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2019 the original author or authors. * Copyright 2019-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -60,7 +60,7 @@ import org.springframework.security.rsocket.util.matcher.RoutePayloadExchangeMat
* &#064;Bean * &#064;Bean
* PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) { * PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
* rsocket * rsocket
* .authorizePayload((authorize) -> * .authorizePayload((authorize) -&gt;
* authorize * authorize
* .anyRequest().authenticated() * .anyRequest().authenticated()
* ); * );
@ -87,7 +87,7 @@ import org.springframework.security.rsocket.util.matcher.RoutePayloadExchangeMat
* &#064;Bean * &#064;Bean
* PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) { * PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
* rsocket * rsocket
* .authorizePayload((authorize) -> * .authorizePayload((authorize) -&gt;
* authorize * authorize
* // must have ROLE_SETUP to make connection * // must have ROLE_SETUP to make connection
* .setup().hasRole("SETUP") * .setup().hasRole("SETUP")

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -269,11 +269,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) { * protected void configure(HttpSecurity http) {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .openidLogin((openidLogin) -> * .openidLogin((openidLogin) -&gt;
* openidLogin * openidLogin
* .permitAll() * .permitAll()
* ); * );
@ -302,48 +302,48 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* *
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http.authorizeRequests((authorizeRequests) -> * http.authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .openidLogin((openidLogin) -> * .openidLogin((openidLogin) -&gt;
* openidLogin * openidLogin
* .loginPage(&quot;/login&quot;) * .loginPage(&quot;/login&quot;)
* .permitAll() * .permitAll()
* .authenticationUserDetailsService( * .authenticationUserDetailsService(
* new AutoProvisioningUserDetailsService()) * new AutoProvisioningUserDetailsService())
* .attributeExchange((googleExchange) -> * .attributeExchange((googleExchange) -&gt;
* googleExchange * googleExchange
* .identifierPattern(&quot;https://www.google.com/.*&quot;) * .identifierPattern(&quot;https://www.google.com/.*&quot;)
* .attribute((emailAttribute) -> * .attribute((emailAttribute) -&gt;
* emailAttribute * emailAttribute
* .name(&quot;email&quot;) * .name(&quot;email&quot;)
* .type(&quot;https://axschema.org/contact/email&quot;) * .type(&quot;https://axschema.org/contact/email&quot;)
* .required(true) * .required(true)
* ) * )
* .attribute((firstnameAttribute) -> * .attribute((firstnameAttribute) -&gt;
* firstnameAttribute * firstnameAttribute
* .name(&quot;firstname&quot;) * .name(&quot;firstname&quot;)
* .type(&quot;https://axschema.org/namePerson/first&quot;) * .type(&quot;https://axschema.org/namePerson/first&quot;)
* .required(true) * .required(true)
* ) * )
* .attribute((lastnameAttribute) -> * .attribute((lastnameAttribute) -&gt;
* lastnameAttribute * lastnameAttribute
* .name(&quot;lastname&quot;) * .name(&quot;lastname&quot;)
* .type(&quot;https://axschema.org/namePerson/last&quot;) * .type(&quot;https://axschema.org/namePerson/last&quot;)
* .required(true) * .required(true)
* ) * )
* ) * )
* .attributeExchange((yahooExchange) -> * .attributeExchange((yahooExchange) -&gt;
* yahooExchange * yahooExchange
* .identifierPattern(&quot;.*yahoo.com.*&quot;) * .identifierPattern(&quot;.*yahoo.com.*&quot;)
* .attribute((emailAttribute) -> * .attribute((emailAttribute) -&gt;
* emailAttribute * emailAttribute
* .name(&quot;email&quot;) * .name(&quot;email&quot;)
* .type(&quot;https://schema.openid.net/contact/email&quot;) * .type(&quot;https://schema.openid.net/contact/email&quot;)
* .required(true) * .required(true)
* ) * )
* .attribute((fullnameAttribute) -> * .attribute((fullnameAttribute) -&gt;
* fullnameAttribute * fullnameAttribute
* .name(&quot;fullname&quot;) * .name(&quot;fullname&quot;)
* .type(&quot;https://axschema.org/namePerson&quot;) * .type(&quot;https://axschema.org/namePerson&quot;)
@ -497,7 +497,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .headers((headers) -> * .headers((headers) -&gt;
* headers * headers
* .contentTypeOptions(withDefaults()) * .contentTypeOptions(withDefaults())
* .xssProtection(withDefaults()) * .xssProtection(withDefaults())
@ -519,7 +519,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .headers((headers) -> headers.disable()); * .headers((headers) -&gt; headers.disable());
* } * }
* } * }
* </pre> * </pre>
@ -538,7 +538,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .headers((headers) -> * .headers((headers) -&gt;
* headers * headers
* .defaultsDisabled() * .defaultsDisabled()
* .cacheControl(withDefaults()) * .cacheControl(withDefaults())
@ -560,9 +560,9 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .headers((headers) -> * .headers((headers) -&gt;
* headers * headers
* .frameOptions((frameOptions) -> frameOptions.disable()) * .frameOptions((frameOptions) -&gt; frameOptions.disable())
* ); * );
* } * }
* </pre> * </pre>
@ -686,17 +686,17 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .anyRequest().hasRole(&quot;USER&quot;) * .anyRequest().hasRole(&quot;USER&quot;)
* ) * )
* .formLogin((formLogin) -> * .formLogin((formLogin) -&gt;
* formLogin * formLogin
* .permitAll() * .permitAll()
* ) * )
* .sessionManagement((sessionManagement) -> * .sessionManagement((sessionManagement) -&gt;
* sessionManagement * sessionManagement
* .sessionConcurrency((sessionConcurrency) -> * .sessionConcurrency((sessionConcurrency) -&gt;
* sessionConcurrency * sessionConcurrency
* .maximumSessions(1) * .maximumSessions(1)
* .expiredUrl(&quot;/login?expired&quot;) * .expiredUrl(&quot;/login?expired&quot;)
@ -797,11 +797,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .requiresChannel((requiresChannel) -> * .requiresChannel((requiresChannel) -&gt;
* requiresChannel * requiresChannel
* .anyRequest().requiresSecure() * .anyRequest().requiresSecure()
* ) * )
* .portMapper((portMapper) -> * .portMapper((portMapper) -&gt;
* portMapper * portMapper
* .http(9090).mapsTo(9443) * .http(9090).mapsTo(9443)
* .http(80).mapsTo(443) * .http(80).mapsTo(443)
@ -910,11 +910,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .jee((jee) -> * .jee((jee) -&gt;
* jee * jee
* .mappableRoles(&quot;USER&quot;, &quot;ADMIN&quot;) * .mappableRoles(&quot;USER&quot;, &quot;ADMIN&quot;)
* ); * );
@ -1018,7 +1018,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -1090,7 +1090,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -1197,7 +1197,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -1218,7 +1218,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;) * .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;)
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
@ -1240,7 +1240,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;) * .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;)
@ -1281,7 +1281,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeHttpRequests((authorizeHttpRequests) -> * .authorizeHttpRequests((authorizeHttpRequests) -&gt;
* authorizeHttpRequests * authorizeHttpRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -1302,7 +1302,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeHttpRequests((authorizeHttpRequests) -> * .authorizeHttpRequests((authorizeHttpRequests) -&gt;
* authorizeHttpRequests * authorizeHttpRequests
* .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;) * .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;)
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
@ -1324,7 +1324,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeHttpRequests((authorizeHttpRequests) -> * .authorizeHttpRequests((authorizeHttpRequests) -&gt;
* authorizeHttpRequests * authorizeHttpRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;) * .antMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;)
@ -1380,11 +1380,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .requestCache((requestCache) -> * .requestCache((requestCache) -&gt;
* requestCache.disable() * requestCache.disable()
* ); * );
* } * }
@ -1428,12 +1428,12 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* // sample exception handling customization * // sample exception handling customization
* .exceptionHandling((exceptionHandling) -> * .exceptionHandling((exceptionHandling) -&gt;
* exceptionHandling * exceptionHandling
* .accessDeniedPage(&quot;/errors/access-denied&quot;) * .accessDeniedPage(&quot;/errors/access-denied&quot;)
* ); * );
@ -1477,7 +1477,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .securityContext((securityContext) -> * .securityContext((securityContext) -&gt;
* securityContext * securityContext
* .securityContextRepository(SCR) * .securityContextRepository(SCR)
* ); * );
@ -1519,7 +1519,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .servletApi((servletApi) -> * .servletApi((servletApi) -&gt;
* servletApi.disable() * servletApi.disable()
* ); * );
* } * }
@ -1575,7 +1575,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .csrf((csrf) -> csrf.disable()); * .csrf((csrf) -&gt; csrf.disable());
* } * }
* } * }
* </pre> * </pre>
@ -1651,13 +1651,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .formLogin(withDefaults()) * .formLogin(withDefaults())
* // sample logout customization * // sample logout customization
* .logout((logout) -> * .logout((logout) -&gt;
* logout.deleteCookies(&quot;remove&quot;) * logout.deleteCookies(&quot;remove&quot;)
* .invalidateHttpSession(false) * .invalidateHttpSession(false)
* .logoutUrl(&quot;/custom-logout&quot;) * .logoutUrl(&quot;/custom-logout&quot;)
@ -1766,13 +1766,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .formLogin(withDefaults()) * .formLogin(withDefaults())
* // sample anonymous customization * // sample anonymous customization
* .anonymous((anonymous) -> * .anonymous((anonymous) -&gt;
* anonymous * anonymous
* .authorities(&quot;ROLE_ANON&quot;) * .authorities(&quot;ROLE_ANON&quot;)
* ) * )
@ -1792,13 +1792,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .formLogin(withDefaults()) * .formLogin(withDefaults())
* // sample anonymous customization * // sample anonymous customization
* .anonymous((anonymous) -> * .anonymous((anonymous) -&gt;
* anonymous.disable() * anonymous.disable()
* ); * );
* } * }
@ -1901,7 +1901,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -1920,11 +1920,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .formLogin((formLogin) -> * .formLogin((formLogin) -&gt;
* formLogin * formLogin
* .usernameParameter(&quot;username&quot;) * .usernameParameter(&quot;username&quot;)
* .passwordParameter(&quot;password&quot;) * .passwordParameter(&quot;password&quot;)
@ -2278,7 +2278,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .anyRequest().authenticated() * .anyRequest().authenticated()
* ) * )
@ -2362,7 +2362,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .anyRequest().authenticated() * .anyRequest().authenticated()
* ) * )
@ -2419,13 +2419,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .anyRequest().authenticated() * .anyRequest().authenticated()
* ) * )
* .oauth2ResourceServer((oauth2ResourceServer) -> * .oauth2ResourceServer((oauth2ResourceServer) -&gt;
* oauth2ResourceServer * oauth2ResourceServer
* .jwt((jwt) -> * .jwt((jwt) -&gt;
* jwt * jwt
* .decoder(jwtDecoder()) * .decoder(jwtDecoder())
* ) * )
@ -2512,12 +2512,12 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
* .formLogin(withDefaults()) * .formLogin(withDefaults())
* .requiresChannel((requiresChannel) -> * .requiresChannel((requiresChannel) -&gt;
* requiresChannel * requiresChannel
* .anyRequest().requiresSecure() * .anyRequest().requiresSecure()
* ); * );
@ -2586,7 +2586,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -2828,11 +2828,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .requestMatchers((requestMatchers) -> * .requestMatchers((requestMatchers) -&gt;
* requestMatchers * requestMatchers
* .antMatchers(&quot;/api/**&quot;, &quot;/oauth/**&quot;) * .antMatchers(&quot;/api/**&quot;, &quot;/oauth/**&quot;)
* ) * )
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -2851,12 +2851,12 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .requestMatchers((requestMatchers) -> * .requestMatchers((requestMatchers) -&gt;
* requestMatchers * requestMatchers
* .antMatchers(&quot;/api/**&quot;) * .antMatchers(&quot;/api/**&quot;)
* .antMatchers(&quot;/oauth/**&quot;) * .antMatchers(&quot;/oauth/**&quot;)
* ) * )
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )
@ -2875,15 +2875,15 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* &#064;Override * &#064;Override
* protected void configure(HttpSecurity http) throws Exception { * protected void configure(HttpSecurity http) throws Exception {
* http * http
* .requestMatchers((requestMatchers) -> * .requestMatchers((requestMatchers) -&gt;
* requestMatchers * requestMatchers
* .antMatchers(&quot;/api/**&quot;) * .antMatchers(&quot;/api/**&quot;)
* ) * )
* .requestMatchers((requestMatchers) -> * .requestMatchers((requestMatchers) -&gt;
* requestMatchers * requestMatchers
* .antMatchers(&quot;/oauth/**&quot;) * .antMatchers(&quot;/oauth/**&quot;)
* ) * )
* .authorizeRequests((authorizeRequests) -> * .authorizeRequests((authorizeRequests) -&gt;
* authorizeRequests * authorizeRequests
* .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;) * .antMatchers(&quot;/**&quot;).hasRole(&quot;USER&quot;)
* ) * )

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ import org.springframework.security.config.annotation.web.builders.WebSecurity;
* <pre> * <pre>
* &#064;Bean * &#064;Bean
* public WebSecurityCustomizer ignoringCustomizer() { * public WebSecurityCustomizer ignoringCustomizer() {
* return (web) -> web.ignoring().antMatchers("/ignore1", "/ignore2"); * return (web) -&gt; web.ignoring().antMatchers("/ignore1", "/ignore2");
* } * }
* </pre> * </pre>
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -170,7 +170,7 @@ public final class CsrfConfigurer<H extends HttpSecurityBuilder<H>>
* <pre> * <pre>
* http * http
* .csrf() * .csrf()
* .ignoringRequestMatchers((request) -> "XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) * .ignoringRequestMatchers((request) -&gt; "XMLHttpRequest".equals(request.getHeader("X-Requested-With")))
* .and() * .and()
* ... * ...
* </pre> * </pre>

View File

@ -398,7 +398,7 @@ public class ServerHttpSecurity {
* http * http
* // ... * // ...
* .redirectToHttps() * .redirectToHttps()
* .httpsRedirectWhen((serverWebExchange) -> * .httpsRedirectWhen((serverWebExchange) -&gt;
* serverWebExchange.getRequest().getHeaders().containsKey("X-Requires-Https")) * serverWebExchange.getRequest().getHeaders().containsKey("X-Requires-Https"))
* return http.build(); * return http.build();
* } * }
@ -433,9 +433,9 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .redirectToHttps((redirectToHttps) -> * .redirectToHttps((redirectToHttps) -&gt;
* redirectToHttps * redirectToHttps
* .httpsRedirectWhen((serverWebExchange) -> * .httpsRedirectWhen((serverWebExchange) -&gt;
* serverWebExchange.getRequest().getHeaders().containsKey("X-Requires-Https")) * serverWebExchange.getRequest().getHeaders().containsKey("X-Requires-Https"))
* ); * );
* return http.build(); * return http.build();
@ -503,7 +503,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .csrf((csrf) -> * .csrf((csrf) -&gt;
* csrf.disabled() * csrf.disabled()
* ); * );
* return http.build(); * return http.build();
@ -518,7 +518,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .csrf((csrf) -> * .csrf((csrf) -&gt;
* csrf * csrf
* // Handle CSRF failures * // Handle CSRF failures
* .accessDeniedHandler(accessDeniedHandler) * .accessDeniedHandler(accessDeniedHandler)
@ -609,7 +609,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .anonymous((anonymous) -> * .anonymous((anonymous) -&gt;
* anonymous * anonymous
* .key("key") * .key("key")
* .authorities("ROLE_ANONYMOUS") * .authorities("ROLE_ANONYMOUS")
@ -662,7 +662,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .httpBasic((httpBasic) -> * .httpBasic((httpBasic) -&gt;
* httpBasic * httpBasic
* // used for authenticating the credentials * // used for authenticating the credentials
* .authenticationManager(authenticationManager) * .authenticationManager(authenticationManager)
@ -721,7 +721,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .formLogin((formLogin) -> * .formLogin((formLogin) -&gt;
* formLogin * formLogin
* // used for authenticating the credentials * // used for authenticating the credentials
* .authenticationManager(authenticationManager) * .authenticationManager(authenticationManager)
@ -783,7 +783,7 @@ public class ServerHttpSecurity {
* &#064;Bean * &#064;Bean
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* .x509((x509) -> * .x509((x509) -&gt;
* x509 * x509
* .authenticationManager(authenticationManager) * .authenticationManager(authenticationManager)
* .principalExtractor(principalExtractor) * .principalExtractor(principalExtractor)
@ -841,7 +841,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .oauth2Login((oauth2Login) -> * .oauth2Login((oauth2Login) -&gt;
* oauth2Login * oauth2Login
* .authenticationConverter(authenticationConverter) * .authenticationConverter(authenticationConverter)
* .authenticationManager(manager) * .authenticationManager(manager)
@ -892,7 +892,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .oauth2Client((oauth2Client) -> * .oauth2Client((oauth2Client) -&gt;
* oauth2Client * oauth2Client
* .clientRegistrationRepository(clientRegistrationRepository) * .clientRegistrationRepository(clientRegistrationRepository)
* .authorizedClientRepository(authorizedClientRepository) * .authorizedClientRepository(authorizedClientRepository)
@ -943,9 +943,9 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .oauth2ResourceServer((oauth2ResourceServer) -> * .oauth2ResourceServer((oauth2ResourceServer) -&gt;
* oauth2ResourceServer * oauth2ResourceServer
* .jwt((jwt) -> * .jwt((jwt) -&gt;
* jwt * jwt
* .publicKey(publicKey()) * .publicKey(publicKey())
* ) * )
@ -1029,15 +1029,15 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .headers((headers) -> * .headers((headers) -&gt;
* headers * headers
* // customize frame options to be same origin * // customize frame options to be same origin
* .frameOptions((frameOptions) -> * .frameOptions((frameOptions) -&gt;
* frameOptions * frameOptions
* .mode(XFrameOptionsServerHttpHeadersWriter.Mode.SAMEORIGIN) * .mode(XFrameOptionsServerHttpHeadersWriter.Mode.SAMEORIGIN)
* ) * )
* // disable cache control * // disable cache control
* .cache((cache) -> * .cache((cache) -&gt;
* cache * cache
* .disable() * .disable()
* ) * )
@ -1090,7 +1090,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .exceptionHandling((exceptionHandling) -> * .exceptionHandling((exceptionHandling) -&gt;
* exceptionHandling * exceptionHandling
* // customize how to request for authentication * // customize how to request for authentication
* .authenticationEntryPoint(entryPoint) * .authenticationEntryPoint(entryPoint)
@ -1125,10 +1125,10 @@ public class ServerHttpSecurity {
* .pathMatchers(HttpMethod.POST, "/users").hasAuthority("USER_POST") * .pathMatchers(HttpMethod.POST, "/users").hasAuthority("USER_POST")
* // a request to /users/{username} requires the current authentication's username * // a request to /users/{username} requires the current authentication's username
* // to be equal to the {username} * // to be equal to the {username}
* .pathMatchers("/users/{username}").access((authentication, context) -> * .pathMatchers("/users/{username}").access((authentication, context) -&gt;
* authentication * authentication
* .map(Authentication::getName) * .map(Authentication::getName)
* .map((username) -> username.equals(context.getVariables().get("username"))) * .map((username) -&gt; username.equals(context.getVariables().get("username")))
* .map(AuthorizationDecision::new) * .map(AuthorizationDecision::new)
* ) * )
* // allows providing a custom matching strategy that requires the role "ROLE_CUSTOM" * // allows providing a custom matching strategy that requires the role "ROLE_CUSTOM"
@ -1155,7 +1155,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .authorizeExchange((exchanges) -> * .authorizeExchange((exchanges) -&gt;
* exchanges * exchanges
* // any URL that starts with /admin/ requires the role "ROLE_ADMIN" * // any URL that starts with /admin/ requires the role "ROLE_ADMIN"
* .pathMatchers("/admin/**").hasRole("ADMIN") * .pathMatchers("/admin/**").hasRole("ADMIN")
@ -1163,10 +1163,10 @@ public class ServerHttpSecurity {
* .pathMatchers(HttpMethod.POST, "/users").hasAuthority("USER_POST") * .pathMatchers(HttpMethod.POST, "/users").hasAuthority("USER_POST")
* // a request to /users/{username} requires the current authentication's username * // a request to /users/{username} requires the current authentication's username
* // to be equal to the {username} * // to be equal to the {username}
* .pathMatchers("/users/{username}").access((authentication, context) -> * .pathMatchers("/users/{username}").access((authentication, context) -&gt;
* authentication * authentication
* .map(Authentication::getName) * .map(Authentication::getName)
* .map((username) -> username.equals(context.getVariables().get("username"))) * .map((username) -&gt; username.equals(context.getVariables().get("username")))
* .map(AuthorizationDecision::new) * .map(AuthorizationDecision::new)
* ) * )
* // allows providing a custom matching strategy that requires the role "ROLE_CUSTOM" * // allows providing a custom matching strategy that requires the role "ROLE_CUSTOM"
@ -1224,7 +1224,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .logout((logout) -> * .logout((logout) -&gt;
* logout * logout
* // configures how log out is done * // configures how log out is done
* .logoutHandler(logoutHandler) * .logoutHandler(logoutHandler)
@ -1280,7 +1280,7 @@ public class ServerHttpSecurity {
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
* http * http
* // ... * // ...
* .requestCache((requestCache) -> * .requestCache((requestCache) -&gt;
* requestCache * requestCache
* // configures how the request is cached * // configures how the request is cached
* .requestCache(customRequestCache) * .requestCache(customRequestCache)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2018 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ import java.util.Map;
* *
* <pre> * <pre>
* String idForEncode = "bcrypt"; * String idForEncode = "bcrypt";
* Map&lt;String,PasswordEncoder&gt; encoders = new HashMap<>(); * Map&lt;String,PasswordEncoder&gt; encoders = new HashMap&lt;&gt;();
* encoders.put(idForEncode, new BCryptPasswordEncoder()); * encoders.put(idForEncode, new BCryptPasswordEncoder());
* encoders.put("noop", NoOpPasswordEncoder.getInstance()); * encoders.put("noop", NoOpPasswordEncoder.getInstance());
* encoders.put("pbkdf2", new Pbkdf2PasswordEncoder()); * encoders.put("pbkdf2", new Pbkdf2PasswordEncoder());

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -99,7 +99,7 @@ public final class JwtIssuerReactiveAuthenticationManagerResolver
* authenticationManagers.put("https://issuerOne.example.org", managerOne); * authenticationManagers.put("https://issuerOne.example.org", managerOne);
* authenticationManagers.put("https://issuerTwo.example.org", managerTwo); * authenticationManagers.put("https://issuerTwo.example.org", managerTwo);
* JwtIssuerReactiveAuthenticationManagerResolver resolver = new JwtIssuerReactiveAuthenticationManagerResolver * JwtIssuerReactiveAuthenticationManagerResolver resolver = new JwtIssuerReactiveAuthenticationManagerResolver
* ((issuer) -> Mono.justOrEmpty(authenticationManagers.get(issuer)); * ((issuer) -&gt; Mono.justOrEmpty(authenticationManagers.get(issuer));
* </pre> * </pre>
* *
* The keys in the {@link Map} are the trusted issuers. * The keys in the {@link Map} are the trusted issuers.