# ApiAuth

com.google.api.server.spi.config

## Annotation Type ApiAuth

-

  *** ** * ** ***

  <br />

  ```
  @Retention(value=RUNTIME)
   @Target(value=TYPE)
  public @interface ApiAuth
  ```
  Annotation for API authentication configuration.
-
  -

    ### Optional Element Summary

    | Modifier and Type | Optional Element and Description |
    |---|---|
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AnnotationBoolean.html` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiAuth.html#allowCookieAuth--` Allows cookie authentication to be used for the API. |
    | `java.lang.String[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiAuth.html#blockedRegions--` A list of ISO region codes to block. |
    [Optional Elements]

-
  -

    ### Element Detail


    -

      #### allowCookieAuth

      ```
      public abstract AnnotationBoolean allowCookieAuth
      ```
      Allows cookie authentication to be used for the API. By default, API methods do not allow cookie authentication, and require the use of OAuth2. Setting this field to `true` will allow cookies to be used to access the API, with potentially dangerous results. Please be very cautious in enabling this setting, and make sure to require appropriate XSRF tokens to protect your API.

      Default:
      :   com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED

  <!-- -->

  -

    -

      #### blockedRegions

      ```
      public abstract java.lang.String[] blockedRegions
      ```
      A list of ISO region codes to block. By default, APIs allow all regions.

      Default:
      :   {}