Class NullPrompter

  • All Implemented Interfaces:
    javax.security.auth.callback.CallbackHandler

    public class NullPrompter
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler
    This class implements CallbackHandler interface handling behaviour but without doing any prompting.

    The constructor with no parameters is overridden by NullPrompter class to hide the constructor with no parameters, since we are not prompting. *

    • Constructor Summary

      Constructors 
      Constructor Description
      NullPrompter​(java.lang.String userName, char[] authenticator)
      Constructor with two parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(javax.security.auth.callback.Callback[] callbacks)
      Handles callbacks passed from the underlying security services.
      void nukeEm()
      Clears the user name and authenticator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullPrompter

        public NullPrompter​(java.lang.String userName,
                            char[] authenticator)
        Constructor with two parameters.
        Parameters:
        userName -
        authenticator -
    • Method Detail

      • nukeEm

        public void nukeEm()
        Clears the user name and authenticator.
      • handle

        public void handle​(javax.security.auth.callback.Callback[] callbacks)
                    throws java.io.IOException,
                           javax.security.auth.callback.UnsupportedCallbackException
        Handles callbacks passed from the underlying security services.
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Parameters:
        callbacks - an array of Callback objects provided by an underlying security service which contains the information requested to be retrieved or displayed
        Throws:
        java.io.IOException - if an I/O error occurs
        javax.security.auth.callback.UnsupportedCallbackException - if unrecognized callback occurs