Class PlainAuthenticateCallback

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

    public class PlainAuthenticateCallback
    extends java.lang.Object
    implements javax.security.auth.callback.Callback
    • Constructor Summary

      Constructors 
      Constructor Description
      PlainAuthenticateCallback​(char[] password)
      Creates a callback with the password provided by the client
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean authenticated()
      Returns true if client password matches expected password, false otherwise.
      void authenticated​(boolean authenticated)
      Sets the authenticated state.
      char[] password()
      Returns the password provided by the client during SASL/PLAIN authentication
      • Methods inherited from class java.lang.Object

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

      • PlainAuthenticateCallback

        public PlainAuthenticateCallback​(char[] password)
        Creates a callback with the password provided by the client
        Parameters:
        password - The password provided by the client during SASL/PLAIN authentication
    • Method Detail

      • password

        public char[] password()
        Returns the password provided by the client during SASL/PLAIN authentication
      • authenticated

        public boolean authenticated()
        Returns true if client password matches expected password, false otherwise. This state is set the server-side callback handler.
      • authenticated

        public void authenticated​(boolean authenticated)
        Sets the authenticated state. This is set by the server-side callback handler by matching the client provided password with the expected password.
        Parameters:
        authenticated - true indicates successful authentication