Skip to content

Commit

Permalink
Merge branch '6.0.x'
Browse files Browse the repository at this point in the history
Closes gh-12993
  • Loading branch information
marcusdacoregio committed Apr 11, 2023
2 parents d4ed0ad + 3401594 commit 5db3e54
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/reactive/test/web/authentication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ After xref:reactive/test/web/setup.adoc[applying the Spring Security support to
.Java
[source,java,role="primary"]
----
import static org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.mockUser;
@Test
public void messageWhenNotAuthenticated() throws Exception {
this.rest
Expand Down Expand Up @@ -66,6 +68,7 @@ public void messageWhenMutateWithMockAdminThenOk() throws Exception {
[source,kotlin,role="secondary"]
----
import org.springframework.test.web.reactive.server.expectBody
import org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.mockUser
//...
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/reactive/test/web/csrf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Spring Security also provides support for CSRF testing with `WebTestClient` -- f
.Java
[source,java,role="primary"]
----
import static org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.csrf;
this.rest
// provide a valid CSRF token
.mutateWith(csrf())
Expand All @@ -17,6 +19,8 @@ this.rest
.Kotlin
[source,kotlin,role="secondary"]
----
import org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.csrf
this.rest
// provide a valid CSRF token
.mutateWith(csrf())
Expand Down
6 changes: 6 additions & 0 deletions docs/modules/ROOT/pages/reactive/test/web/setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The basic setup looks like this:
.Java
[source,java,role="primary"]
----
import static org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.springSecurity;
import static org.springframework.web.reactive.function.client.ExchangeFilterFunctions.basicAuthentication;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = HelloWebfluxMethodApplication.class)
public class HelloWebfluxMethodApplicationTests {
Expand All @@ -31,6 +34,9 @@ public class HelloWebfluxMethodApplicationTests {
.Kotlin
[source,kotlin,role="secondary"]
----
import org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.springSecurity
import org.springframework.web.reactive.function.client.ExchangeFilterFunctions.basicAuthentication
@ExtendWith(SpringExtension::class)
@ContextConfiguration(classes = [HelloWebfluxMethodApplication::class])
class HelloWebfluxMethodApplicationTests {
Expand Down

0 comments on commit 5db3e54

Please sign in to comment.