# AuthLevel

com.google.api.server.spi.config

## Enum AuthLevel

- java.lang.Object
-
  - java.lang.Enum\<[AuthLevel](https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html "enum in com.google.api.server.spi.config")\>
  -
    - com.google.api.server.spi.config.AuthLevel

-

  All Implemented Interfaces:
  :   java.io.Serializable, java.lang.Comparable\<[AuthLevel](https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html "enum in com.google.api.server.spi.config")\>

  *** ** * ** ***

  <br />

  ```
  public enum AuthLevel
  extends java.lang.Enum<AuthLevel>
  ```
  Enum to choose frontend authentication level for use in endpoints annotations. Frontend authentication is handled by a Google API server prior to the request reaching backends. An early return before hitting the backend can happen if the request does not fulfill the requirement specified by the AuthLevel.
-
  -

    ### Enum Constant Summary

    | Enum Constant and Description |
    |---|
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#NONE` Frontend authentication will be skipped. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#OPTIONAL` Authentication is optional. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#OPTIONAL_CONTINUE` Authentication is optional and will be attempted if authentication credential are supplied. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#REQUIRED` Valid authentication credentials are required. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#UNSPECIFIED` Unspecified; AuthLevel is system default if there is any. |
    [Enum Constants]

  <!-- -->

  -

    ### Method Summary

    | Modifier and Type | Method and Description |
    |---|---|
    | `static https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#valueOf-java.lang.String-(java.lang.String name)` Returns the enum constant of this type with the specified name. |
    | `static https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html#values--()` Returns an array containing the constants of this enum type, in the order they are declared. |
    [All Methods Static Methods Concrete Methods]

    -

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


    -

      #### REQUIRED

      ```
      public static final AuthLevel REQUIRED
      ```
      Valid authentication credentials are required.


    -

      #### OPTIONAL

      ```
      public static final AuthLevel OPTIONAL
      ```
      Authentication is optional. If authentication credentials are supplied they must be valid.


    -

      #### OPTIONAL_CONTINUE

      ```
      public static final AuthLevel OPTIONAL_CONTINUE
      ```
      Authentication is optional and will be attempted if authentication credential are supplied. The request can still reach backend if authentication failed.


    -

      #### NONE

      ```
      public static final AuthLevel NONE
      ```
      Frontend authentication will be skipped. Existing authentication in cloud endpoints still applies.


    -

      #### UNSPECIFIED

      ```
      public static final AuthLevel UNSPECIFIED
      ```
      Unspecified; AuthLevel is system default if there is any.

  <!-- -->

  -

    ### Method Detail


    -

      #### values

      ```
      public static AuthLevel[] 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 (AuthLevel c : AuthLevel.values())
          System.out.println(c);
      ```

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


    -

      #### valueOf

      ```
      public static AuthLevel valueOf(java.lang.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:
      :   `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
      :   `java.lang.NullPointerException` - if the argument is null