# Service Usage V1 API - Class Google::Api::Authentication (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::Authentication.

`Authentication` defines the authentication configuration for API methods
provided by an API service.

Example:

    name: calendar.googleapis.com
    authentication:
      providers:
      - id: google_calendar_auth
        jwks_uri: https://www.googleapis.com/oauth2/v1/certs
        issuer: https://securetoken.google.com
      rules:
      - selector: "*"
        requirements:
          provider_id: google_calendar_auth
      - selector: google.calendar.Delegate
        oauth:
          canonical_scopes: https://www.googleapis.com/auth/calendar.read

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #providers

    def providers() -> ::Array<::Google::Api::AuthProvider>

**Returns**

- (::Array\<[::Google::Api::AuthProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider)\>) --- Defines a set of authentication providers that a service supports.

### #providers=

    def providers=(value) -> ::Array<::Google::Api::AuthProvider>

**Parameter**

- **value** (::Array\<[::Google::Api::AuthProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider)\>) --- Defines a set of authentication providers that a service supports.
**Returns**

- (::Array\<[::Google::Api::AuthProvider](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthProvider)\>) --- Defines a set of authentication providers that a service supports.

### #rules

    def rules() -> ::Array<::Google::Api::AuthenticationRule>

**Returns**

- (::Array\<[::Google::Api::AuthenticationRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthenticationRule)\>) --- A list of authentication rules that apply to individual API methods.


  **NOTE:** All service configuration rules follow "last one wins" order.

### #rules=

    def rules=(value) -> ::Array<::Google::Api::AuthenticationRule>

**Parameter**

- **value** (::Array\<[::Google::Api::AuthenticationRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthenticationRule)\>) --- A list of authentication rules that apply to individual API methods.


  **NOTE:** All service configuration rules follow "last one wins" order.
**Returns**

- (::Array\<[::Google::Api::AuthenticationRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthenticationRule)\>) --- A list of authentication rules that apply to individual API methods.


  **NOTE:** All service configuration rules follow "last one wins" order.