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 SummaryFields Modifier and Type Field Description static StringENFORCE_AUTH_ENABLEDstatic StringENFORCE_AUTH_SCHEMESstatic StringSASL_AUTH_SCHEMEstatic StringSESSION_REQUIRE_CLIENT_SASL_AUTH
 - 
Constructor SummaryConstructors Constructor Description AuthenticationHelper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanenforceAuthentication(ServerCnxn connection, int xid)Returns true when authentication enforcement was success otherwise returns false also closes the connectionbooleanisEnforceAuthEnabled()booleanisSaslAuthRequired()
 
- 
- 
- 
Field Detail- 
ENFORCE_AUTH_ENABLEDpublic static final String ENFORCE_AUTH_ENABLED - See Also:
- Constant Field Values
 
 - 
ENFORCE_AUTH_SCHEMESpublic static final String ENFORCE_AUTH_SCHEMES - See Also:
- Constant Field Values
 
 - 
SESSION_REQUIRE_CLIENT_SASL_AUTHpublic static final String SESSION_REQUIRE_CLIENT_SASL_AUTH - See Also:
- Constant Field Values
 
 - 
SASL_AUTH_SCHEMEpublic static final String SASL_AUTH_SCHEME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isEnforceAuthEnabledpublic boolean isEnforceAuthEnabled() 
 - 
enforceAuthenticationpublic 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 connection
- xid- current operation xid
- Returns:
- true when authentication enforcement is success otherwise false
- Throws:
- IOException
 
 - 
isSaslAuthRequiredpublic boolean isSaslAuthRequired() 
 
- 
 
-