public Subject fallbackAuthenticate(String userId, String password) throws AuthenticationException {
try {
Session session = ThreadSession.get();
try {
log.log(loggingPriority, "attempting to authenticate: " + userId);
Person person = getPerson(session, userId);
if (person != null) {
if (isPasswordMatched(person, password)) {
HashSet principals = new HashSet();
principals.add(new PersonPrincipal(person));
return new Subject(false, principals, new HashSet(), new HashSet());