public static final class SecurityMockMvcResultMatchers.AuthenticatedMatcher extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
match(MvcResult result) |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withAuthentication(org.springframework.security.core.Authentication expected)
Specifies the expected
Authentication |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withAuthenticationName(String expected)
Specifies the expected
Principal.getName() |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withAuthenticationPrincipal(Object expected)
Specifies the expected principal
|
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withAuthorities(Collection<org.springframework.security.core.GrantedAuthority> expected)
Specifies the
Authentication.getAuthorities() |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withRoles(String... roles)
Specifies the
Authentication.getAuthorities() |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withSecurityContext(org.springframework.security.core.context.SecurityContext expected)
Specifies the expected
SecurityContext |
SecurityMockMvcResultMatchers.AuthenticatedMatcher |
withUsername(String expected)
Specifies the expected username
|
public SecurityMockMvcResultMatchers.AuthenticatedMatcher withUsername(String expected)
expected - the expected usernameSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withSecurityContext(org.springframework.security.core.context.SecurityContext expected)
SecurityContextexpected - the expected SecurityContextSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withAuthentication(org.springframework.security.core.Authentication expected)
Authenticationexpected - the expected AuthenticationSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withAuthenticationPrincipal(Object expected)
expected - the expected principalSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withAuthenticationName(String expected)
Principal.getName()expected - the expected Principal.getName()SecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withAuthorities(Collection<org.springframework.security.core.GrantedAuthority> expected)
Authentication.getAuthorities()expected - the Authentication.getAuthorities()SecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withRoles(String... roles)
Authentication.getAuthorities()roles - the roles. Each value is automatically prefixed with "ROLE_"SecurityMockMvcResultMatchers.AuthenticatedMatcher for further customization