- acceptMediaType(MediaType) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestBuilders.FormLoginRequestBuilder
-
Specify a media type to set as the Accept header in the request.
- accessToken(OAuth2AccessToken) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2ClientMutator
-
Use this OAuth2AccessToken
- accessToken(OAuth2AccessToken) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OAuth2ClientRequestPostProcessor
-
Use this OAuth2AccessToken
- accountExpired(boolean) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
- accountLocked(boolean) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.CsrfMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.JwtMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2ClientMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2LoginMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OidcLoginMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OpaqueTokenMutator
-
- afterConfigureAdded(WebTestClient.MockServerSpec<?>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.CsrfMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.JwtMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2ClientMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2LoginMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OidcLoginMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OpaqueTokenMutator
-
- afterConfigurerAdded(WebTestClient.Builder, WebHttpHandlerBuilder, ClientHttpConnector) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
- afterTestMethod(TestContext) - Method in class org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener
-
- anonymous() - Static method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors
-
Establish a SecurityContext that uses an
AnonymousAuthenticationToken.
- asHeader() - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor
-
Instead of using the CsrfToken as a request parameter (default) will
populate the CsrfToken as a header.
- attributes(Consumer<Map<String, Object>>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2LoginMutator
-
Mutate the attributes using the given Consumer
- attributes(Consumer<Map<String, Object>>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OpaqueTokenMutator
-
Mutate the attributes using the given Consumer
- attributes(Consumer<Map<String, Object>>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor
-
Mutate the attributes using the given Consumer
- attributes(Consumer<Map<String, Object>>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor
-
Mutate the attributes using the given Consumer
- authenticated() - Static method in class org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers
-
ResultMatcher that verifies that a specified user is authenticated.
- authentication(Authentication) - Static method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors
-
Establish a SecurityContext that uses the specified Authentication
for the Authentication.getPrincipal() and a custom UserDetails.
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.JwtMutator
-
Use the provided authorities in the token
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.JwtMutator
-
Use the provided authorities in the token
- authorities(Converter<Jwt, Collection<GrantedAuthority>>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.JwtMutator
-
Provides the configured Jwt so that custom authorities can be derived
from it
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2LoginMutator
-
Use the provided authorities in the Authentication
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OAuth2LoginMutator
-
Use the provided authorities in the Authentication
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OidcLoginMutator
-
Use the provided authorities in the Authentication
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OidcLoginMutator
-
Use the provided authorities in the Authentication
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OpaqueTokenMutator
-
Use the provided authorities in the resulting principal
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.OpaqueTokenMutator
-
Use the provided authorities in the resulting principal
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
Specifies the GrantedAuthoritys to use.
- authorities(Collection<? extends GrantedAuthority>) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
Specifies the GrantedAuthoritys to use.
- authorities(String...) - Method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers.UserExchangeMutator
-
Specifies the GrantedAuthoritys to use.
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor
-
Use the provided authorities in the token
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor
-
Use the provided authorities in the token
- authorities(Converter<Jwt, Collection<GrantedAuthority>>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor
-
Provides the configured Jwt so that custom authorities can be derived
from it
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor
-
Use the provided authorities in the Authentication
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor
-
Use the provided authorities in the Authentication
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OidcLoginRequestPostProcessor
-
Use the provided authorities in the Authentication
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OidcLoginRequestPostProcessor
-
Use the provided authorities in the Authentication
- authorities(Collection<GrantedAuthority>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor
-
Use the provided authorities in the resulting principal
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor
-
Use the provided authorities in the resulting principal
- authorities(GrantedAuthority...) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor
-
Populates the user's GrantedAuthority's.
- authorities(Collection<? extends GrantedAuthority>) - Method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor
-
Populates the user's GrantedAuthority's.
- match(MvcResult) - Method in class org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.AuthenticatedMatcher
-
- mockAuthentication(Authentication) - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to use the provided Authentication as the Principal
- mockJwt() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a SecurityContext that has a
JwtAuthenticationToken for the
Authentication and a Jwt for the
Authentication.getPrincipal().
- mockOAuth2Client() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a OAuth2AuthorizedClient in the session.
- mockOAuth2Client(String) - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a OAuth2AuthorizedClient in the session.
- mockOAuth2Login() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a SecurityContext that has a
OAuth2AuthenticationToken for the
Authentication.
- mockOidcLogin() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a SecurityContext that has a
OAuth2AuthenticationToken for the
Authentication.
- mockOpaqueToken() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to establish a SecurityContext that has a
BearerTokenAuthentication for the
Authentication and an OAuth2AuthenticatedPrincipal for the
Authentication.getPrincipal().
- mockUser(UserDetails) - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to use the provided UserDetails to create a UsernamePasswordAuthenticationToken as
the Principal
- mockUser() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to use a UserDetails to create a UsernamePasswordAuthenticationToken as
the Principal.
- mockUser(String) - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Updates the ServerWebExchange to use a UserDetails to create a UsernamePasswordAuthenticationToken as
the Principal.
- securityContext(SecurityContext) - Static method in class org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors
-
Establish the specified SecurityContext to be used.
- SecurityMockMvcConfigurers - Class in org.springframework.security.test.web.servlet.setup
-
Provides Security related
MockMvcConfigurer implementations.
- SecurityMockMvcConfigurers() - Constructor for class org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers
-
- SecurityMockMvcRequestBuilders - Class in org.springframework.security.test.web.servlet.request
-
Contains Spring Security related MockMvc RequestBuilders.
- SecurityMockMvcRequestBuilders.FormLoginRequestBuilder - Class in org.springframework.security.test.web.servlet.request
-
Creates a form based login request including any necessary CsrfToken.
- SecurityMockMvcRequestBuilders.LogoutRequestBuilder - Class in org.springframework.security.test.web.servlet.request
-
Creates a logout request (including any necessary CsrfToken)
- SecurityMockMvcRequestPostProcessors - Class in org.springframework.security.test.web.servlet.request
-
Contains MockMvc RequestPostProcessor implementations for Spring
Security.
- SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
Populates a valid CsrfToken into the request.
- SecurityMockMvcRequestPostProcessors.DigestRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.OAuth2ClientRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.OAuth2LoginRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.OidcLoginRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.OpaqueTokenRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
- SecurityMockMvcRequestPostProcessors.UserRequestPostProcessor - Class in org.springframework.security.test.web.servlet.request
-
Creates a UsernamePasswordAuthenticationToken and sets the principal to be
a User and associates it to the MockHttpServletRequest.
- SecurityMockMvcResultMatchers - Class in org.springframework.security.test.web.servlet.response
-
Security related MockMvc ResultMatchers.
- SecurityMockMvcResultMatchers.AuthenticatedMatcher - Class in org.springframework.security.test.web.servlet.response
-
A MockMvc ResultMatcher that verifies a specific user is associated
to the MvcResult.
- SecurityMockServerConfigurers - Class in org.springframework.security.test.web.reactive.server
-
Test utilities for working with Spring Security and
WebTestClient.Builder.apply(WebTestClientConfigurer).
- SecurityMockServerConfigurers() - Constructor for class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
- SecurityMockServerConfigurers.CsrfMutator - Class in org.springframework.security.test.web.reactive.server
-
- SecurityMockServerConfigurers.JwtMutator - Class in org.springframework.security.test.web.reactive.server
-
Updates the WebServerExchange using
{@link SecurityMockServerConfigurers#mockAuthentication(Authentication)}.
- SecurityMockServerConfigurers.OAuth2ClientMutator - Class in org.springframework.security.test.web.reactive.server
-
- SecurityMockServerConfigurers.OAuth2LoginMutator - Class in org.springframework.security.test.web.reactive.server
-
- SecurityMockServerConfigurers.OidcLoginMutator - Class in org.springframework.security.test.web.reactive.server
-
- SecurityMockServerConfigurers.OpaqueTokenMutator - Class in org.springframework.security.test.web.reactive.server
-
- SecurityMockServerConfigurers.UserExchangeMutator - Class in org.springframework.security.test.web.reactive.server
-
Updates the WebServerExchange using {@link SecurityMockServerConfigurers#mockUser(UserDetails)}.
- SecurityTestExecutionListeners - Annotation Type in org.springframework.security.test.context.annotation
-
There are many times a user may want to use Spring Security's test support
(i.e.
- setAuthentication(Authentication) - Static method in class org.springframework.security.test.context.TestSecurityContextHolder
-
Creates a new SecurityContext with the given Authentication.
- setContext(SecurityContext) - Static method in class org.springframework.security.test.context.TestSecurityContextHolder
-
- setCsrfTokenRepository(HttpServletRequest, CsrfTokenRepository) - Static method in class org.springframework.security.test.web.support.WebTestUtils
-
Sets the CsrfTokenRepository for the specified HttpServletRequest.
- setSecurityContextRepository(HttpServletRequest, SecurityContextRepository) - Static method in class org.springframework.security.test.web.support.WebTestUtils
-
Sets the SecurityContextRepository for the specified
HttpServletRequest.
- springSecurity() - Static method in class org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers
-
Sets up Spring Security's WebTestClient test support
- springSecurity() - Static method in class org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers
-
Configures the MockMvcBuilder for use with Spring Security.
- springSecurity(Filter) - Static method in class org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers
-
Configures the MockMvcBuilder for use with Spring Security.