public class UserAuthPassword extends AbstractUserAuth
NamedResource.Utils
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
log
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Constructor and Description |
---|
UserAuthPassword() |
Modifier and Type | Method and Description |
---|---|
void |
init(ClientSession session,
String service) |
protected boolean |
processAuthDataRequest(ClientSession session,
String service,
Buffer buffer) |
protected boolean |
sendAuthDataRequest(ClientSession session,
String service) |
protected void |
sendPassword(Buffer buffer,
ClientSession session,
String oldPassword,
String newPassword)
Sends the password via a
SSH_MSG_USERAUTH_REQUEST message. |
destroy, getClientSession, getName, getService, getSession, process, toString
public static final String NAME
public void init(ClientSession session, String service) throws Exception
init
in interface UserAuth
init
in class AbstractUserAuth
session
- The ClientSession
service
- The requesting service nameException
- If failed to initialize the mechanismprotected boolean sendAuthDataRequest(ClientSession session, String service) throws Exception
sendAuthDataRequest
in class AbstractUserAuth
Exception
protected boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception
processAuthDataRequest
in class AbstractUserAuth
Exception
protected void sendPassword(Buffer buffer, ClientSession session, String oldPassword, String newPassword) throws IOException
SSH_MSG_USERAUTH_REQUEST
message.
If old and new password are not the same then it requests a password
modification from the server (which may be denied if the server does
not support this feature).buffer
- The Buffer
to re-use for sending the messagesession
- The target ClientSession
oldPassword
- The previous passwordnewPassword
- The new passwordIOException
- If failed to send the message.Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.