/** * Authenticate a user. * * @param username a username * @param password a plain text password, as entered by the user * * @return a Principal object representing the user if successful, false otherwise */ public Principal authenticate(String username, String password) { if (booleanAuthenticate(username, password)) { return new SimplePrincipal(username); } else { return null; } }