2425262728293031323334
if (user == null) { return null; } // Validate password if (!user.checkPassword(password)) { return null; } return new AuthenticatedPrincipal(username); }