org.acegisecurity.providers
Class TestingAuthenticationToken
java.lang.Object
org.acegisecurity.providers.AbstractAuthenticationToken
org.acegisecurity.providers.TestingAuthenticationToken
- All Implemented Interfaces:
- Serializable, Principal, Authentication
public class TestingAuthenticationToken
- extends AbstractAuthenticationToken
An Authentication
implementation that is designed for use whilst unit testing.
The
corresponding authentication provider is TestingAuthenticationProvider
.
- Version:
- $Id: TestingAuthenticationToken.java 1784 2007-02-24 21:00:24Z luke_t $
- Author:
- Ben Alex
- See Also:
- Serialized Form
TestingAuthenticationToken
public TestingAuthenticationToken(Object principal,
Object credentials,
GrantedAuthority[] authorities)
getCredentials
public Object getCredentials()
- Description copied from interface:
Authentication
- The credentials that prove the principal is correct. This is usually a password, but could be anything
relevant to the
AuthenticationManager
. Callers are expected to populate the credentials.
- Returns:
- the credentials that prove the identity of the
Principal
getPrincipal
public Object getPrincipal()
- Description copied from interface:
Authentication
- The identity of the principal being authenticated. This is usually a username. Callers are expected to
populate the principal.
- Returns:
- the
Principal
being authenticated
Copyright © 2004-2011 Interface21, Inc. All Rights Reserved.