Package org.eclipse.remote.core
Interface IUserAuthenticatorService
- All Superinterfaces:
IRemoteConnection.Service
Allow clients to provide their own user interface for connection authentication.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.remote.core.IRemoteConnection.Service
IRemoteConnection.Service.Factory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
ID for a "Cancel" response (value 1).static final int
Constant for an error prompt (value 1).static final int
Constant for an information prompt (value 2).static final int
ID for a "No" response (value 3).static final int
Constant for a prompt with no type (value 0).static final int
ID for an "Ok" response (value 0).static final int
Constant for a question prompt (value 3).static final int
Constant for a warning dialog (value 4).static final int
ID for a "Yes" response (value 2). -
Method Summary
Modifier and TypeMethodDescriptionint
prompt
(int promptType, String title, String message, int[] promptResponses, int defaultResponseIndex) Prompts for additional information regarding this authentication request.Authenticates the user for access.String[]
Prompts the user for a number values using text fields.Methods inherited from interface org.eclipse.remote.core.IRemoteConnection.Service
getRemoteConnection
-
Field Details
-
OK
static final int OKID for an "Ok" response (value 0).- See Also:
-
CANCEL
static final int CANCELID for a "Cancel" response (value 1).- See Also:
-
YES
static final int YESID for a "Yes" response (value 2).- See Also:
-
NO
static final int NOID for a "No" response (value 3).- See Also:
-
NONE
static final int NONEConstant for a prompt with no type (value 0).- See Also:
-
ERROR
static final int ERRORConstant for an error prompt (value 1).- See Also:
-
INFORMATION
static final int INFORMATIONConstant for an information prompt (value 2).- See Also:
-
QUESTION
static final int QUESTIONConstant for a question prompt (value 3).- See Also:
-
WARNING
static final int WARNINGConstant for a warning dialog (value 4).- See Also:
-
-
Method Details
-
prompt
Authenticates the user for access. The obtained values for user name and password will be placed into returned object. Implementors are allowed to save user names and passwords. The user should be prompted for user name and password if there is no saved one.- Parameters:
username
- The initial username, or null if there is no initial usernamemessage
- An optional message to display if, e.g., previous authentication failed.
-
prompt
Prompts the user for a number values using text fields. The labels are provided in theprompt array. Implementors will return the entered values, or null if the user cancels the prompt. - Parameters:
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- Returns:
- the entered values, or null if the user canceled.
-
prompt
int prompt(int promptType, String title, String message, int[] promptResponses, int defaultResponseIndex) Prompts for additional information regarding this authentication request. A default implementation of this method should return thedefaultResponse
, whereas alternate implementations could prompt the user with a dialog.- Parameters:
promptType
- one of the following values:-
NONE
for a unspecified prompt type -
ERROR
for an error prompt -
INFORMATION
for an information prompt -
QUESTION
for a question prompt -
WARNING
for a warning prompt
-
title
- 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- Returns:
- the response to the prompt
-