public static final class SecurityMockMvcResultMatchers.AuthenticatedMatcher extends Object
public SecurityMockMvcResultMatchers.AuthenticatedMatcher withUsername(String expected)
expected - the expected usernameSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withSecurityContext(SecurityContext expected)
SecurityContextexpected - the expected SecurityContextSecurityMockMvcResultMatchers.AuthenticatedMatcher for further customizationpublic SecurityMockMvcResultMatchers.AuthenticatedMatcher withAuthentication(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<? extends 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