public class UserAuthPassword extends AbstractUserAuth
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
logBY_NAME_COMPARATOR, NAME_EXTRACTOR| Constructor and Description |
|---|
UserAuthPassword() |
| Modifier and Type | Method and Description |
|---|---|
protected Boolean |
checkPassword(Buffer buffer,
ServerSession session,
String username,
String password)
Invokes the configured
PasswordAuthenticator and returns the result. |
Boolean |
doAuth(Buffer buffer,
boolean init) |
protected Boolean |
handleClientPasswordChangeRequest(Buffer buffer,
ServerSession session,
String username,
String oldPassword,
String newPassword)
Invoked when the client sends a
SSH_MSG_USERAUTH_REQUEST indicating a password change. |
protected Boolean |
handleServerPasswordChangeRequest(Buffer buffer,
ServerSession session,
String username,
String password,
PasswordChangeRequiredException e)
Invoked by
checkPassword(Buffer, ServerSession, String, String) when a
PasswordChangeRequiredException was thrown by the authenticator. |
auth, destroy, getName, getServerSession, getService, getSession, getUsername, next, toStringdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNamepublic static final String NAME
public Boolean doAuth(Buffer buffer, boolean init) throws Exception
doAuth in class AbstractUserAuthExceptionprotected Boolean checkPassword(Buffer buffer, ServerSession session, String username, String password) throws Exception
PasswordAuthenticator and returns the result. If
PasswordChangeRequiredException thrown by the authenticator then
handleServerPasswordChangeRequest(Buffer, ServerSession, String, String, PasswordChangeRequiredException)
is invokedbuffer - The received Buffer to be re-used if need to send a password change requestsession - The ServerSession through which the request was receivedusername - The usernamepassword - The passwordnull then exception was handled internally and
authentication is still in progressException - If internal error during authentication (exception for PasswordChangeRequiredException
which is handled internally)handleServerPasswordChangeRequest(Buffer, ServerSession, String, String,
PasswordChangeRequiredException)protected Boolean handleClientPasswordChangeRequest(Buffer buffer, ServerSession session, String username, String oldPassword, String newPassword) throws Exception
SSH_MSG_USERAUTH_REQUEST indicating a password change. Throws
UnsupportedOperationException by defaultbuffer - The Buffer to re-use in order to respondsession - The associated ServerSessionusername - The usernameoldPassword - The old passwordnewPassword - The new passwordnull means authentication incomplete -
i.e., handler has sent some extra query.Exception - If failed to handle the request.protected Boolean handleServerPasswordChangeRequest(Buffer buffer, ServerSession session, String username, String password, PasswordChangeRequiredException e) throws Exception
checkPassword(Buffer, ServerSession, String, String) when a
PasswordChangeRequiredException was thrown by the authenticator. By default it re-throws the original
exception.buffer - The received Buffer to be re-used if need to send a password change requestsession - The ServerSession through which the request was receivedusername - The usernamepassword - The (rejected) passworde - The original thrown exceptionnull by default to indicate incomplete authenticationException - If failed to dispatch the messageCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.