Class AbstractUserAuth

    • Field Detail

      • name

        private final java.lang.String name
      • service

        private java.lang.String service
    • Constructor Detail

      • AbstractUserAuth

        protected AbstractUserAuth​(java.lang.String name)
    • Method Detail

      • getName

        public final java.lang.String getName()
        Specified by:
        getName in interface NamedResource
        Returns:
        The resource name
      • getService

        public java.lang.String getService()
      • init

        public void init​(ClientSession session,
                         java.lang.String service)
                  throws java.lang.Exception
        Specified by:
        init in interface UserAuth
        Parameters:
        session - The ClientSession
        service - The requesting service name
        Throws:
        java.lang.Exception - If failed to initialize the mechanism
      • process

        public boolean process​(Buffer buffer)
                        throws java.lang.Exception
        Specified by:
        process in interface UserAuth
        Parameters:
        buffer - The Buffer to process - null if not a response buffer, i.e., the underlying authentication mechanism should initiate whatever challenge/response mechanism is required
        Returns:
        true if request handled - false if the next authentication mechanism should be used
        Throws:
        java.lang.Exception - If failed to process the request
      • sendAuthDataRequest

        protected abstract boolean sendAuthDataRequest​(ClientSession session,
                                                       java.lang.String service)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • processAuthDataRequest

        protected abstract boolean processAuthDataRequest​(ClientSession session,
                                                          java.lang.String service,
                                                          Buffer buffer)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • destroy

        public void destroy()
        Description copied from interface: UserAuth
        Called to release any allocated resources
        Specified by:
        destroy in interface UserAuth
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object