|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IUserAuthenticator
Allow clients to provide their own user interface for connection authentication.
| Field Summary | |
|---|---|
static int |
CANCEL
ID for a "Cancel" response (value 1). |
static int |
ERROR
Constant for an error prompt (value 1). |
static int |
INFORMATION
Constant for an information prompt (value 2). |
static int |
NO
ID for a "No" response (value 3). |
static int |
NONE
Constant for a prompt with no type (value 0). |
static int |
OK
ID for an "Ok" response (value 0). |
static int |
QUESTION
Constant for a question prompt (value 3). |
static int |
WARNING
Constant for a warning dialog (value 4). |
static int |
YES
ID for a "Yes" response (value 2). |
| Method Summary | |
|---|---|
int |
prompt(int promptType,
String title,
String message,
int[] promptResponses,
int defaultResponseIndex)
Prompts for additional information regarding this authentication request. |
PasswordAuthentication |
prompt(String username,
String message)
Authenticates the user for access. |
String[] |
prompt(String destination,
String name,
String message,
String[] prompt,
boolean[] echo)
Prompts the user for a number values using text fields. |
| Field Detail |
|---|
static final int OK
static final int CANCEL
static final int YES
static final int NO
static final int NONE
static final int ERROR
static final int INFORMATION
static final int QUESTION
static final int WARNING
| Method Detail |
|---|
PasswordAuthentication prompt(String username,
String message)
username - The initial username, or null if there is no initial usernamemessage - An optional message to display if, e.g., previous authentication failed.
String[] prompt(String destination,
String name,
String message,
String[] prompt,
boolean[] echo)
destination - 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 secret
int prompt(int promptType,
String title,
String message,
int[] promptResponses,
int defaultResponseIndex)
defaultResponse,
whereas alternate implementations could prompt the user with a dialog.
promptType - 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
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||