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

Authentication rules for the service.


By default, if a method has any authentication requirements, every request
must include a valid credential matching one of the requirements.
It's an error to include more than one kind of credential in a single
request.

<br />

If a method doesn't have any auth requirements, request credentials will be
ignored.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allow_without_credential

    def allow_without_credential() -> ::Boolean

**Returns**

- (::Boolean) --- If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.

### #allow_without_credential=

    def allow_without_credential=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.
**Returns**

- (::Boolean) --- If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.

### #oauth

    def oauth() -> ::Google::Api::OAuthRequirements

**Returns**

- ([::Google::Api::OAuthRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-OAuthRequirements)) --- The requirements for OAuth credentials.

### #oauth=

    def oauth=(value) -> ::Google::Api::OAuthRequirements

**Parameter**

- **value** ([::Google::Api::OAuthRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-OAuthRequirements)) --- The requirements for OAuth credentials.
**Returns**

- ([::Google::Api::OAuthRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-OAuthRequirements)) --- The requirements for OAuth credentials.

### #requirements

    def requirements() -> ::Array<::Google::Api::AuthRequirement>

**Returns**

- (::Array\<[::Google::Api::AuthRequirement](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthRequirement)\>) --- Requirements for additional authentication providers.

### #requirements=

    def requirements=(value) -> ::Array<::Google::Api::AuthRequirement>

**Parameter**

- **value** (::Array\<[::Google::Api::AuthRequirement](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthRequirement)\>) --- Requirements for additional authentication providers.
**Returns**

- (::Array\<[::Google::Api::AuthRequirement](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-AuthRequirement)\>) --- Requirements for additional authentication providers.

### #selector

    def selector() -> ::String

**Returns**

- (::String) --- Selects the methods to which this rule applies.

  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.

### #selector=

    def selector=(value) -> ::String

**Parameter**

- **value** (::String) --- Selects the methods to which this rule applies.


  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.
**Returns**

- (::String) --- Selects the methods to which this rule applies.

  Refer to [selector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Api-DocumentationRule#Google__Api__DocumentationRule_selector_instance_ "Google::Api::DocumentationRule#selector (method)") for syntax
  details.