Interface AuthenticationHandler<ParameterType,​TokenType>

    • Method Detail

      • start

        void start()
            throws java.lang.Exception
        Produces the initial authentication token that can be then retrieved via getToken().
        Throws:
        java.lang.Exception - if an error occurs
      • process

        void process()
              throws java.lang.Exception
        Produces the next authentication token, if any.
        Throws:
        java.lang.Exception - if an error occurs
      • setParams

        void setParams​(ParameterType input)
        Sets the parameters for the next token generation via start() or process().
        Parameters:
        input - to set, may be null
      • getToken

        TokenType getToken()
                    throws java.lang.Exception
        Retrieves the last token generated.
        Returns:
        the token, or null if there is none
        Throws:
        java.lang.Exception - if an error occurs
      • isDone

        boolean isDone()
        Tells whether is authentication mechanism is done (successfully or unsuccessfully).
        Returns:
        whether this authentication is done
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable