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 relatedMockMvcConfigurerimplementations.SecurityMockMvcRequestBuilders Contains Spring Security relatedMockMvcRequestBuilders.SecurityMockMvcRequestBuilders.FormLoginRequestBuilder Creates a form based login request including any necessaryCsrfToken.SecurityMockMvcRequestBuilders.LogoutRequestBuilder Creates a logout request (including any necessaryCsrfToken)SecurityMockMvcRequestPostProcessors ContainsMockMvcRequestPostProcessorimplementations for Spring Security.SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor Populates a validCsrfTokeninto the request.SecurityMockMvcRequestPostProcessors.DigestRequestPostProcessor SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor SecurityMockMvcRequestPostProcessors.OAuth2ClientRequestPostProcessor SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor SecurityMockMvcRequestPostProcessors.OidcLoginRequestPostProcessor SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor Creates aUsernamePasswordAuthenticationTokenand sets the principal to be aUserand associates it to theMockHttpServletRequest.SecurityMockMvcResultMatchers Security relatedMockMvcResultMatchers.SecurityMockMvcResultMatchers.AuthenticatedMatcher AMockMvcResultMatcherthat 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 ofTestExecutionListenerTestSecurityContextHolder TheTestSecurityContextHolderis very similar toSecurityContextHolder, but is necessary for testing.WebTestUtils A utility class for testing spring securityWithAnonymousUser When used withWithSecurityContextTestExecutionListenerthis annotation can be added to a test method to emulate running with an anonymous user.WithMockUser When used withWithSecurityContextTestExecutionListenerthis annotation can be added to a test method to emulate running with a mocked user.WithSecurityContext An annotation to determine whatSecurityContextto use.WithSecurityContextFactory<A extends java.lang.annotation.Annotation> An API that works with WithUserTestExcecutionListener for creating aSecurityContextthat is populated in theTestSecurityContextHolder.WithSecurityContextTestExecutionListener ATestExecutionListenerthat will find annotations that are annotated withWithSecurityContexton a test method or at the class level.WithUserDetails When used withWithSecurityContextTestExecutionListenerthis annotation can be added to a test method to emulate running with aUserDetailsreturned from theUserDetailsService.