Class OptionalNameCallback

java.lang.Object
javax.security.auth.callback.NameCallback
org.wildfly.security.auth.callback.OptionalNameCallback
All Implemented Interfaces:
Serializable, Callback, ExtendedCallback

public final class OptionalNameCallback extends NameCallback implements ExtendedCallback
A NameCallback which is optional, for mechanisms that can accept a name from the server.
Author:
David M. Lloyd
See Also:
  • Constructor Details

    • OptionalNameCallback

      public OptionalNameCallback(String prompt)
      Construct a new instance.
      Parameters:
      prompt - the prompt to offer the user
    • OptionalNameCallback

      public OptionalNameCallback(String prompt, String defaultName)
      Construct a new instance.
      Parameters:
      prompt - the prompt to offer the user
      defaultName - the default name to specify (must not be null)
  • Method Details

    • needsInformation

      public boolean needsInformation()
      Description copied from interface: ExtendedCallback
      Determine if this callback is requesting information.
      Specified by:
      needsInformation in interface ExtendedCallback
      Returns:
      true if the callback is requesting information, false if it is only providing information