All Classes
-
All Classes Interface Summary Class Summary Enum Summary Annotation Types Summary Class Description ReactorContextTestExecutionListener Sets up the Reactor Context with the Authentication from the TestSecurityContextHolder and then clears the Reactor Context at the end of the tests.SecurityMockMvcConfigurers Provides Security relatedMockMvcConfigurer
implementations.SecurityMockMvcRequestBuilders Contains Spring Security relatedMockMvc
RequestBuilder
s.SecurityMockMvcRequestBuilders.FormLoginRequestBuilder Creates a form based login request including any necessaryCsrfToken
.SecurityMockMvcRequestBuilders.LogoutRequestBuilder Creates a logout request (including any necessaryCsrfToken
)SecurityMockMvcRequestPostProcessors ContainsMockMvc
RequestPostProcessor
implementations for Spring Security.SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor Populates a validCsrfToken
into the request.SecurityMockMvcRequestPostProcessors.DigestRequestPostProcessor SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor SecurityMockMvcRequestPostProcessors.OAuth2ClientRequestPostProcessor SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor SecurityMockMvcRequestPostProcessors.OidcLoginRequestPostProcessor SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor Creates aUsernamePasswordAuthenticationToken
and sets the principal to be aUser
and associates it to theMockHttpServletRequest
.SecurityMockMvcResultHandlers Security relatedMockMvc
ResultHandler
sSecurityMockMvcResultMatchers Security relatedMockMvc
ResultMatcher
s.SecurityMockMvcResultMatchers.AuthenticatedMatcher AMockMvc
ResultMatcher
that verifies a specific user is associated to theMvcResult
.SecurityMockServerConfigurers Test utilities for working with Spring Security andWebTestClient.Builder.apply(WebTestClientConfigurer)
.SecurityMockServerConfigurers.CsrfMutator SecurityMockServerConfigurers.JwtMutator Updates the WebServerExchange using{@link SecurityMockServerConfigurers#mockAuthentication(Authentication)}
.SecurityMockServerConfigurers.OAuth2ClientMutator SecurityMockServerConfigurers.OAuth2LoginMutator SecurityMockServerConfigurers.OidcLoginMutator SecurityMockServerConfigurers.OpaqueTokenMutator SecurityMockServerConfigurers.UserExchangeMutator Updates the WebServerExchange using{@link SecurityMockServerConfigurers#mockUser(UserDetails)}
.SecurityTestExecutionListeners There are many times a user may want to use Spring Security's test support (i.e.TestExecutionEvent Represents the events on the methods ofTestExecutionListener
TestSecurityContextHolder TheTestSecurityContextHolder
is very similar toSecurityContextHolder
, but is necessary for testing.TestSecurityContextHolderStrategyAdapter WebTestUtils A utility class for testing spring securityWithAnonymousUser When used withWithSecurityContextTestExecutionListener
this annotation can be added to a test method to emulate running with an anonymous user.WithMockUser When used withWithSecurityContextTestExecutionListener
this annotation can be added to a test method to emulate running with a mocked user.WithSecurityContext An annotation to determine whatSecurityContext
to use.WithSecurityContextFactory<A extends java.lang.annotation.Annotation> An API that works with WithUserTestExcecutionListener for creating aSecurityContext
that is populated in theTestSecurityContextHolder
.WithSecurityContextTestExecutionListener ATestExecutionListener
that will find annotations that are annotated withWithSecurityContext
on a test method or at the class level.WithUserDetails When used withWithSecurityContextTestExecutionListener
this annotation can be added to a test method to emulate running with aUserDetails
returned from theUserDetailsService
.