public class JSchUserAuthenticator extends java.lang.Object implements IUserAuthenticatorService
| Modifier and Type | Class and Description |
|---|---|
static class |
JSchUserAuthenticator.Factory |
CANCEL, ERROR, INFORMATION, NO, NONE, OK, QUESTION, WARNING, YES| Constructor and Description |
|---|
JSchUserAuthenticator(IRemoteConnection conn) |
| Modifier and Type | Method and Description |
|---|---|
IRemoteConnection |
getRemoteConnection() |
int |
prompt(int promptType,
java.lang.String title,
java.lang.String message,
int[] promptResponses,
int defaultResponseIndex)
Prompts for additional information regarding this authentication
request.
|
java.net.PasswordAuthentication |
prompt(java.lang.String username,
java.lang.String message)
Authenticates the user for access.
|
java.lang.String[] |
prompt(java.lang.String destination,
java.lang.String name,
java.lang.String message,
java.lang.String[] prompt,
boolean[] echo)
Prompts the user for a number values using text fields.
|
public JSchUserAuthenticator(IRemoteConnection conn)
public IRemoteConnection getRemoteConnection()
getRemoteConnection in interface IRemoteConnection.Servicepublic java.net.PasswordAuthentication prompt(java.lang.String username,
java.lang.String message)
IUserAuthenticatorServiceprompt in interface IUserAuthenticatorServiceusername - The initial username, or null if there is no initial usernamemessage - An optional message to display if, e.g., previous authentication failed.public java.lang.String[] prompt(java.lang.String destination,
java.lang.String name,
java.lang.String message,
java.lang.String[] prompt,
boolean[] echo)
IUserAuthenticatorServiceprompt in interface IUserAuthenticatorServicedestination - the destination in the format like username@hostname:portname - a name for this dialogmessage - the message to be displayed to the userprompt - labels for each of the text fields.echo - an array to show which fields are secretpublic int prompt(int promptType,
java.lang.String title,
java.lang.String message,
int[] promptResponses,
int defaultResponseIndex)
IUserAuthenticatorServicedefaultResponse,
whereas alternate implementations could prompt the user with a dialog.prompt in interface IUserAuthenticatorServicepromptType - one of the following values:
NONE for a unspecified prompt typeERROR for an error promptINFORMATION for an information promptQUESTION for a question promptWARNING for a warning prompttitle - the prompt title that could be displayed to the usermessage - the message to display to the userpromptResponses - the possible responses to the prompt (e.g. corresponding to buttons on a dialog)defaultResponseIndex - the default response to the prompt