Package org.apache.zookeeper.server
Class AuthenticationHelper
- java.lang.Object
-
- org.apache.zookeeper.server.AuthenticationHelper
-
public class AuthenticationHelper extends Object
Contains helper methods to enforce authentication
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENFORCE_AUTH_ENABLED
static String
ENFORCE_AUTH_SCHEMES
static String
SASL_AUTH_SCHEME
static String
SESSION_REQUIRE_CLIENT_SASL_AUTH
-
Constructor Summary
Constructors Constructor Description AuthenticationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
enforceAuthentication(ServerCnxn connection, int xid)
Returns true when authentication enforcement was success otherwise returns false also closes the connectionboolean
isEnforceAuthEnabled()
boolean
isSaslAuthRequired()
-
-
-
Field Detail
-
ENFORCE_AUTH_ENABLED
public static final String ENFORCE_AUTH_ENABLED
- See Also:
- Constant Field Values
-
ENFORCE_AUTH_SCHEMES
public static final String ENFORCE_AUTH_SCHEMES
- See Also:
- Constant Field Values
-
SESSION_REQUIRE_CLIENT_SASL_AUTH
public static final String SESSION_REQUIRE_CLIENT_SASL_AUTH
- See Also:
- Constant Field Values
-
SASL_AUTH_SCHEME
public static final String SASL_AUTH_SCHEME
- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnforceAuthEnabled
public boolean isEnforceAuthEnabled()
-
enforceAuthentication
public boolean enforceAuthentication(ServerCnxn connection, int xid) throws IOException
Returns true when authentication enforcement was success otherwise returns false also closes the connection- Parameters:
connection
- server connectionxid
- current operation xid- Returns:
- true when authentication enforcement is success otherwise false
- Throws:
IOException
-
isSaslAuthRequired
public boolean isSaslAuthRequired()
-
-