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 RequestBuilders.
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.
 
A RequestPostProcessor for establishing a JWT-authenticated user for use in tests.
A RequestPostProcessor for establishing an OAuth2AuthorizedClient for use in tests.
A RequestPostProcessor for establishing an OAuth 2.0 login-authenticated user for use in tests.
A RequestPostProcessor for establishing an OIDC-authenticated user for use in tests.
A RequestPostProcessor for establishing an opaque-token-authenticated user for use in tests.
Creates a UsernamePasswordAuthenticationToken and sets the principal to be a User and associates it to the MockHttpServletRequest.
Security related MockMvc ResultHandlers.
Security related MockMvc ResultMatchers.
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)}.
Configures a mock authorized OAuth2 client for use in tests.
Configures a mock authenticated OAuth2 login for use in tests.
Configures a mock authenticated OIDC login for use in tests.
Configures a mock authenticated opaque token for use in tests.
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.