org.eclipse.remote.core

## Interface IUserAuthenticatorService

All Superinterfaces:
  IRemoteConnection.Service

    public interface IUserAuthenticatorService
    extends 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

Fields
`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

All Methods Instance Methods Abstract Methods
`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.

### Methods inherited from interface org.eclipse.remote.core.IRemoteConnection.Service

`getRemoteConnection`

### Field Detail

#### OK

    static final int OK

ID for an "Ok" response (value 0).

See Also:
  Constant Field Values

#### CANCEL

    static final int CANCEL

ID for a "Cancel" response (value 1).

See Also:
  Constant Field Values

#### YES

    static final int YES

ID for a "Yes" response (value 2).

See Also:
  Constant Field Values

#### NO

    static final int NO

ID for a "No" response (value 3).

See Also:
  Constant Field Values

#### NONE

    static final int NONE

Constant for a prompt with no type (value 0).

See Also:
  Constant Field Values

#### ERROR

    static final int ERROR

Constant for an error prompt (value 1).

See Also:
  Constant Field Values

#### INFORMATION

    static final int INFORMATION

Constant for an information prompt (value 2).

See Also:
  Constant Field Values

#### QUESTION

    static final int QUESTION

Constant for a question prompt (value 3).

See Also:
  Constant Field Values

#### WARNING

    static final int WARNING

Constant for a warning dialog (value 4).

See Also:
  Constant Field Values

### Method Detail

#### prompt

    java.net.PasswordAuthentication prompt(java.lang.String username,
                                           java.lang.String message)

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 username
  `message` - An optional message to display if, e.g., previous authentication failed.

#### prompt

    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. The labels are provided in the <core>prompt 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:port
  `name` - a name for this dialog
  `message` - the message to be displayed to the user
  `prompt` - 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,
               java.lang.String title,
               java.lang.String message,
               int[] promptResponses,
               int defaultResponseIndex)

Prompts for additional information regarding this authentication request. A default implementation of this method should return the `defaultResponse`, 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 user
  `message` - the message to display to the user
  `promptResponses` - 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