All Classes and Interfaces
Class
Description
Sets up the Reactor Context with the Authentication from the TestSecurityContextHolder
and then clears the Reactor Context at the end of the tests.
Provides Security related
MockMvcConfigurer
implementations.Contains Spring Security related
MockMvc
RequestBuilder
s.Creates a form based login request including any necessary
CsrfToken
.Creates a logout request (including any necessary
CsrfToken
)Contains
MockMvc
RequestPostProcessor
implementations for Spring
Security.Populates a valid
CsrfToken
into the request.Creates a
UsernamePasswordAuthenticationToken
and sets the principal to be
a User
and associates it to the MockHttpServletRequest
.Security related
MockMvc
ResultHandler
sSecurity related
MockMvc
ResultMatcher
s.A
MockMvc
ResultMatcher
that verifies a specific user is associated
to the MvcResult
.Test utilities for working with Spring Security and
WebTestClient.Builder.apply(WebTestClientConfigurer)
.Updates the WebServerExchange using
{@link
SecurityMockServerConfigurers#mockAuthentication(Authentication)}
.Updates the WebServerExchange using
{@link
SecurityMockServerConfigurers#mockUser(UserDetails)}
.There are many times a user may want to use Spring Security's test support (i.e.
Represents the events on the methods of
TestExecutionListener
The
TestSecurityContextHolder
is very similar to SecurityContextHolder
,
but is necessary for testing.A utility class for testing spring security
When used with
WithSecurityContextTestExecutionListener
this annotation can be
added to a test method to emulate running with an anonymous user.When used with
WithSecurityContextTestExecutionListener
this annotation can be
added to a test method to emulate running with a mocked user.
An annotation to determine what
SecurityContext
to use.An API that works with WithUserTestExcecutionListener for creating a
SecurityContext
that is populated in the TestSecurityContextHolder
.A
TestExecutionListener
that will find annotations that are annotated with
WithSecurityContext
on a test method or at the class level.When used with
WithSecurityContextTestExecutionListener
this annotation can be
added to a test method to emulate running with a UserDetails
returned from the
UserDetailsService
.