Class SASLAuthenticationProvider

    • Constructor Detail

      • SASLAuthenticationProvider

        public SASLAuthenticationProvider()
    • Method Detail

      • handleAuthentication

        public KeeperException.Code handleAuthentication​(ServerCnxn cnxn,
                                                         byte[] authData)
        Description copied from interface: AuthenticationProvider
        This method is called when a client passes authentication data for this scheme. The authData is directly from the authentication packet. The implementor may attach new ids to the authInfo field of cnxn or may use cnxn to send packets back to the client.
        Specified by:
        handleAuthentication in interface AuthenticationProvider
        Parameters:
        cnxn - the cnxn that received the authentication information.
        authData - the authentication data received.
        Returns:
        TODO
      • matches

        public boolean matches​(String id,
                               String aclExpr)
        Description copied from interface: AuthenticationProvider
        This method is called to see if the given id matches the given id expression in the ACL. This allows schemes to use application specific wild cards.
        Specified by:
        matches in interface AuthenticationProvider
        Parameters:
        id - the id to check.
        aclExpr - the expression to match ids against.
        Returns:
        true if the id can be matched by the expression.
      • isAuthenticated

        public boolean isAuthenticated()
        Description copied from interface: AuthenticationProvider
        This method is used to check if the authentication done by this provider should be used to identify the creator of a node. Some ids such as hosts and ip addresses are rather transient and in general don't really identify a client even though sometimes they do.
        Specified by:
        isAuthenticated in interface AuthenticationProvider
        Returns:
        true if this provider identifies creators.