/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(certs); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { if (isLocked(username)) { // Trying to authenticate a locked user is an automatic failure registerAuthFailure(username); log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } Principal authenticatedUser = super.authenticate(username, credentials); if (authenticatedUser == null) { registerAuthFailure(username); } else { registerAuthSuccess(username); } return authenticatedUser; }
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);
private Principal filterLockedAccounts(String username, Principal authenticatedUser) { // Register all failed authentications if (authenticatedUser == null && isAvailable()) { registerAuthFailure(username); } if (isLocked(username)) { // If the user is currently locked, authentication will always fail log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } if (authenticatedUser != null) { registerAuthSuccess(username); } return authenticatedUser; }
private Principal filterLockedAccounts(String username, Principal authenticatedUser) { // Register all failed authentications if (authenticatedUser == null && isAvailable()) { registerAuthFailure(username); } if (isLocked(username)) { // If the user is currently locked, authentication will always fail log.warn(sm.getString("lockOutRealm.authLockedUser", username)); return null; } if (authenticatedUser != null) { registerAuthSuccess(username); } return authenticatedUser; }
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);
registerAuthFailure(username); registerAuthFailure(username); } else { registerAuthSuccess(username);