public boolean authenticate(final String username, final String password) { try { final boolean authenticated = authenticator.authenticate(username, password); if (!authenticated) { log.info("Cannot authenticate user '" + username + "' as they used an incorrect password"); } return authenticated; } catch (final EntityException e) { log.info("Cannot authenticate user '" + username + "' as they do not exist."); return false; } }
protected boolean authenticate(String username, String password) { try { boolean authenticated = authenticator.authenticate(username, password); if (authenticated) log.info("User '" + username + "' successfully logged in"); else log.info("Cannot login user '" + username + "' as they used an incorrect password"); return authenticated; } catch (EntityException e) { log.info("Cannot login user '" + username + "' as they do not exist."); return false; } } }
public boolean authenticate(final String username, final String password) { try { final boolean authenticated = authenticator.authenticate(username, password); if (!authenticated) { log.info("Cannot authenticate user '" + username + "' as they used an incorrect password"); } return authenticated; } catch (final EntityException e) { log.info("Cannot authenticate user '" + username + "' as they do not exist."); return false; } }
public boolean authenticate(final String username, final String password) { try { final boolean authenticated = authenticator.authenticate(username, password); if (!authenticated) { log.info("Cannot authenticate user '" + username + "' as they used an incorrect password"); } return authenticated; } catch (final EntityException e) { log.info("Cannot authenticate user '" + username + "' as they do not exist."); return false; } }
private boolean authenticate(Authenticator authenticator, String username, String password) { try { return authenticator.authenticate(username, password); } catch (EntityException e) { log.error(authenticator.getRepository() + ": " + e.getMessage()); return false; } }