# Service Usage V1 API - Class Google::Api::AuthRequirement (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.7.0 0.6.2 0.5.0 0.4.0 0.3.1 0.2.1 0.1.4 Reference documentation and code samples for the Service Usage V1 API class Google::Api::AuthRequirement.

User-defined authentication requirements, including support for
[JSON Web Token
(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #audiences

    def audiences() -> ::String

**Returns**

- (::String) --- NOTE: This will be deprecated soon, once AuthProvider.audiences is
  implemented and accepted in all the runtime components.

  The list of JWT
  [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
  that are allowed to access. A JWT containing any of these audiences will
  be accepted. When this setting is absent, only JWTs with audience
  "https://\[Service_name\]\[google.api.Service.name\]/[API_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Api#Google__Protobuf__Api_name_instance_ "Google::Protobuf::Api#name (method)")"
  will be accepted. For example, if no audiences are in the setting,
  LibraryService API will only accept JWTs with the following audience
  "https://library-example.googleapis.com/google.example.library.v1.LibraryService".

  Example:

      audiences: bookstore_android.apps.googleusercontent.com,
                 bookstore_web.apps.googleusercontent.com

### #audiences=

    def audiences=(value) -> ::String

**Parameter**

- **value** (::String) ---

  NOTE: This will be deprecated soon, once AuthProvider.audiences is
  implemented and accepted in all the runtime components.

  The list of JWT
  [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
  that are allowed to access. A JWT containing any of these audiences will
  be accepted. When this setting is absent, only JWTs with audience
  "https://\[Service_name\]\[google.api.Service.name\]/[API_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Api#Google__Protobuf__Api_name_instance_ "Google::Protobuf::Api#name (method)")"
  will be accepted. For example, if no audiences are in the setting,
  LibraryService API will only accept JWTs with the following audience
  "https://library-example.googleapis.com/google.example.library.v1.LibraryService".

  Example:

      audiences: bookstore_android.apps.googleusercontent.com,
                 bookstore_web.apps.googleusercontent.com

**Returns**

- (::String) --- NOTE: This will be deprecated soon, once AuthProvider.audiences is
  implemented and accepted in all the runtime components.

  The list of JWT
  [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
  that are allowed to access. A JWT containing any of these audiences will
  be accepted. When this setting is absent, only JWTs with audience
  "https://\[Service_name\]\[google.api.Service.name\]/[API_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Api#Google__Protobuf__Api_name_instance_ "Google::Protobuf::Api#name (method)")"
  will be accepted. For example, if no audiences are in the setting,
  LibraryService API will only accept JWTs with the following audience
  "https://library-example.googleapis.com/google.example.library.v1.LibraryService".

  Example:

      audiences: bookstore_android.apps.googleusercontent.com,
                 bookstore_web.apps.googleusercontent.com

### #provider_id

    def provider_id() -> ::String

**Returns**

- (::String) --- [id](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider#Google__Api__AuthProvider_id_instance_ "Google::Api::AuthProvider#id (method)") from authentication provider.

  Example:

      provider_id: bookstore_auth

### #provider_id=

    def provider_id=(value) -> ::String

**Parameter**

- **value** (::String) ---

  [id](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider#Google__Api__AuthProvider_id_instance_ "Google::Api::AuthProvider#id (method)") from authentication provider.

  Example:

      provider_id: bookstore_auth

**Returns**

- (::String) --- [id](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider#Google__Api__AuthProvider_id_instance_ "Google::Api::AuthProvider#id (method)") from authentication provider.

  Example:

      provider_id: bookstore_auth