public class TestingAuthenticationToken extends AbstractAuthenticationToken
Authentication
implementation that is designed for use whilst unit testing.The
corresponding authentication provider is TestingAuthenticationProvider
.
Constructor and Description |
---|
TestingAuthenticationToken(Object principal,
Object credentials,
GrantedAuthority[] authorities) |
Modifier and Type | Method and Description |
---|---|
Object |
getCredentials()
The credentials that prove the principal is correct.
|
Object |
getPrincipal()
The identity of the principal being authenticated.
|
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
public TestingAuthenticationToken(Object principal, Object credentials, GrantedAuthority[] authorities)
public Object getCredentials()
Authentication
AuthenticationManager
. Callers are expected to populate the credentials.Principal
public Object getPrincipal()
Authentication
Principal
being authenticatedCopyright © 2017. All rights reserved.