The principal and credentials should be set with an
Object that provides the respective property via its Object.toString() method. The
simplest such Object to use is String.
author: Ben Alex version: $Id: UsernamePasswordAuthenticationToken.java 1784 2007-02-24 21:00:24Z luke_t $
public UsernamePasswordAuthenticationToken(Object principal, Object credentials)(Code)
This constructor can be safely used by any code that wishes to create a
UsernamePasswordAuthenticationToken, as the
UsernamePasswordAuthenticationToken.isAuthenticated() will return false.
Parameters: principal - DOCUMENT ME! Parameters: credentials - DOCUMENT ME!
This constructor should only be used by
AuthenticationManager or
AuthenticationProvider implementations that are satisfied
with producing a trusted (ie
UsernamePasswordAuthenticationToken.isAuthenticated() =
true) authentication token.
Parameters: principal - Parameters: credentials - Parameters: authorities -