AuthenticationHelper (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

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 and 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 and Description
    `AuthenticationHelper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `enforceAuthentication(ServerCnxn connection, int xid)` Returns true when authentication enforcement was success otherwise returns false also closes the connection
    `boolean` | `isEnforceAuthEnabled()`
    `boolean` | `isSaslAuthRequired()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

  - ### Constructor Detail

    - #### AuthenticationHelper

          public AuthenticationHelper()

  - ### 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 connection
        `xid` - current operation xid
      Returns:
        true when authentication enforcement is success otherwise false
      Throws:
        `IOException`

    - #### isSaslAuthRequired

          public boolean isSaslAuthRequired()

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.