Package com.sas.services.security

# Class RemotePasswordCallback

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.security.RemotePasswordCallback

All Implemented Interfaces:
  `RemoteCallbackInterface`, `RemotePasswordCallbackInterface`, `Serializable`, `Remote`, `Callback`

public class RemotePasswordCallback extends UnicastRemoteObject implements RemotePasswordCallbackInterface
This is an instance of a PasswordCallback that's remoteable. This class can be used by clients, but typically, they will implement the javax.security.auth.callback.CallbackHandler interface and deal with the local versions of those callbacks, and use Challenger to convert to/from these remote versions.

Since:
  1.0
See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class java.rmi.server.RemoteObject

  `ref`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RemotePasswordCallback(String prompt, boolean isEchoOn)`
  Creates a new instance with a prompt string.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `ClearPassword()`
  Clears the password.
  `char[]`
  `getPassword()`
  Gets the password.
  `String`
  `getPrompt()`
  Gets the prompt.
  `boolean`
  `isEchoOn()`
  Determines whether or not echo is on.
  `void`
  `setPassword(char[] password)`
  Sets the password.

  ### Methods inherited from class java.rmi.server.UnicastRemoteObject

  `clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject`

  ### Methods inherited from class java.rmi.server.RemoteServer

  `getClientHost, getLog, setLog`

  ### Methods inherited from class java.rmi.server.RemoteObject

  `equals, getRef, hashCode, toString, toStub`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### RemotePasswordCallback

    public RemotePasswordCallback(String prompt, boolean isEchoOn) throws RemoteException
    Creates a new instance with a prompt string.

    The remote object will be exported to the RMI system using the specified socket factories.

    Parameters:
      `prompt` - The String to display when asking the user for their username.
      `isEchoOn` - A boolean to instruct the application to echo input or not.
    Throws:
      `RemoteException` - in the event of remote object failure.

- ## Method Details

  - ### ClearPassword

    public void ClearPassword()
    Clears the password.
    Specified by:
      `ClearPassword` in interface `RemotePasswordCallbackInterface`

  - ### getPassword

    public char[] getPassword()
    Gets the password.
    Specified by:
      `getPassword` in interface `RemotePasswordCallbackInterface`
    Returns:
      Password

  - ### setPassword

    public void setPassword(char[] password)
    Sets the password.
    Specified by:
      `setPassword` in interface `RemotePasswordCallbackInterface`
    Parameters:
      `password` - Password

  - ### getPrompt

    public String getPrompt()
    Gets the prompt.
    Specified by:
      `getPrompt` in interface `RemotePasswordCallbackInterface`
    Returns:
      Callback's prompt.

  - ### isEchoOn

    public boolean isEchoOn()
    Determines whether or not echo is on.
    Specified by:
      `isEchoOn` in interface `RemotePasswordCallbackInterface`
    Returns:
      `true` if echo is on.