X509Util.ClientAuth (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.common

## Enum X509Util.ClientAuth

- java.lang.Object
- - java.lang.Enum<X509Util.ClientAuth>
  - - org.apache.zookeeper.common.X509Util.ClientAuth

- All Implemented Interfaces:
    Serializable, Comparable<X509Util.ClientAuth>
  Enclosing class:
    X509Util

      public static enum X509Util.ClientAuth
      extends Enum<X509Util.ClientAuth>

  Enum specifying the client auth requirement of server-side TLS sockets created by this X509Util.
  - NONE - do not request a client certificate.
  - WANT - request a client certificate, but allow anonymous clients to connect.
  - NEED - require a client certificate, disconnect anonymous clients.
  If the config property is not set, the default value is NEED.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NEED`
    `NONE`
    `WANT`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static X509Util.ClientAuth` | `fromPropertyValue(String prop)` Converts a property value to a ClientAuth enum.
    `io.netty.handler.ssl.ClientAuth` | `toNettyClientAuth()`
    `static X509Util.ClientAuth` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static X509Util.ClientAuth[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NONE

          public static final X509Util.ClientAuth NONE

    - #### WANT

          public static final X509Util.ClientAuth WANT

    - #### NEED

          public static final X509Util.ClientAuth NEED

  - ### Method Detail

    - #### values

          public static X509Util.ClientAuth[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (X509Util.ClientAuth c : X509Util.ClientAuth.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static X509Util.ClientAuth valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### fromPropertyValue

          public static X509Util.ClientAuth fromPropertyValue(String prop)

      Converts a property value to a ClientAuth enum. If the input string is empty or null, returns `ClientAuth.NEED`.
      Parameters:
        `prop` - the property string.
      Returns:
        the ClientAuth.
      Throws:
        `IllegalArgumentException` - if the property value is not "NONE", "WANT", "NEED", or empty/null.

    - #### toNettyClientAuth

          public io.netty.handler.ssl.ClientAuth toNettyClientAuth()

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