org.acegisecurity.providers
Class TestingAuthenticationToken

java.lang.Object
  extended by org.acegisecurity.providers.AbstractAuthenticationToken
      extended by 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

Constructor Summary
TestingAuthenticationToken(Object principal, Object credentials, GrantedAuthority[] authorities)
           
 
Method Summary
 Object getCredentials()
          The credentials that prove the principal is correct.
 Object getPrincipal()
          The identity of the principal being authenticated.
 
Methods inherited from class org.acegisecurity.providers.AbstractAuthenticationToken
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestingAuthenticationToken

public TestingAuthenticationToken(Object principal,
                                  Object credentials,
                                  GrantedAuthority[] authorities)
Method Detail

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-2010 Interface21, Inc. All Rights Reserved.