Class SecurityMockMvcResultMatchers
java.lang.Object
org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers
Security related
MockMvc
ResultMatcher
s.- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
AMockMvc
ResultMatcher
that verifies a specific user is associated to theMvcResult
. -
Method Summary
Modifier and TypeMethodDescriptionResultMatcher
that verifies that a specified user is authenticated.static org.springframework.test.web.servlet.ResultMatcher
ResultMatcher
that verifies that no user is authenticated.
-
Method Details
-
authenticated
ResultMatcher
that verifies that a specified user is authenticated.- Returns:
- the
SecurityMockMvcResultMatchers.AuthenticatedMatcher
to use
-
unauthenticated
public static org.springframework.test.web.servlet.ResultMatcher unauthenticated()ResultMatcher
that verifies that no user is authenticated.- Returns:
- the
SecurityMockMvcResultMatchers.AuthenticatedMatcher
to use
-