HttpSecurity.authorizeExchange() allows Method Chaining

Fixes gh-4397
This commit is contained in:
Rob Winch
2017-06-15 15:50:30 -05:00
parent fb85ad6bd7
commit ca6348800e
6 changed files with 94 additions and 107 deletions

View File

@@ -29,7 +29,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
* @since 5.0
*/
public class AuthorizeExchangeBuilderTests {
AuthorizeExchangeBuilder authorization = new AuthorizeExchangeBuilder();
HttpSecurity.AuthorizeExchangeBuilder authorization = HttpSecurity.http().new AuthorizeExchangeBuilder();
@Test
public void antMatchersWhenMethodAndPatternsThenDiscriminatesByMethod() {

View File

@@ -83,7 +83,7 @@ public class HttpSecurityTests {
http.securityContextRepository(new WebSessionSecurityContextRepository());
http.httpBasic();
http.authenticationManager(authenticationManager);
AuthorizeExchangeBuilder authorize = http.authorizeExchange();
HttpSecurity.AuthorizeExchangeBuilder authorize = http.authorizeExchange();
authorize.anyExchange().authenticated();
WebTestClient client = buildClient();