From a54a4c5c5f9f4f44ac980cce21ef184fcddb37bb Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 27 Jul 2020 16:20:47 -0500 Subject: [PATCH] reactive/webflux/hello-security-explicit --- .../src/main/java/example/SecurityConfiguration.java | 2 +- .../src/main/resources/templates/index.html | 2 +- .../src/test/java/example/HelloSecurityTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reactive/webflux/hello-security-explicit/src/main/java/example/SecurityConfiguration.java b/reactive/webflux/hello-security-explicit/src/main/java/example/SecurityConfiguration.java index 497b7d4..b8ca5a7 100644 --- a/reactive/webflux/hello-security-explicit/src/main/java/example/SecurityConfiguration.java +++ b/reactive/webflux/hello-security-explicit/src/main/java/example/SecurityConfiguration.java @@ -42,7 +42,7 @@ public class SecurityConfiguration { .authorizeExchange((exchanges) -> exchanges .anyExchange().authenticated() ) - .httpBasic(withDefaults()); + .formLogin(withDefaults()); // @formatter:on return http.build(); } diff --git a/reactive/webflux/hello-security-explicit/src/main/resources/templates/index.html b/reactive/webflux/hello-security-explicit/src/main/resources/templates/index.html index 4e71378..e7e9f44 100644 --- a/reactive/webflux/hello-security-explicit/src/main/resources/templates/index.html +++ b/reactive/webflux/hello-security-explicit/src/main/resources/templates/index.html @@ -4,6 +4,6 @@

Hello Security

- Log Out + Log Out \ No newline at end of file diff --git a/reactive/webflux/hello-security-explicit/src/test/java/example/HelloSecurityTests.java b/reactive/webflux/hello-security-explicit/src/test/java/example/HelloSecurityTests.java index 5eedc6f..6e7985e 100644 --- a/reactive/webflux/hello-security-explicit/src/test/java/example/HelloSecurityTests.java +++ b/reactive/webflux/hello-security-explicit/src/test/java/example/HelloSecurityTests.java @@ -40,7 +40,7 @@ public class HelloSecurityTests { this.rest.get() .uri("/") .exchange() - .expectStatus().isUnauthorized(); + .expectStatus().is3xxRedirection(); // @formatter:on }