Google API Common Protos Client - Class AuthenticationRule (4.8.3)

Reference documentation and code samples for the Google API Common Protos Client class 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. If a method doesn't have any auth requirements, request credentials will be ignored.

Generated from protobuf message google.api.AuthenticationRule

Namespace

Google \ Api

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ selector string

Selects the methods to which this rule applies. Refer to selector for syntax details.

↳ oauth OAuthRequirements

The requirements for OAuth credentials.

↳ allow_without_credential bool

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

↳ requirements array<AuthRequirement>

Requirements for additional authentication providers.

getSelector

Selects the methods to which this rule applies.

Refer to selector for syntax details.

Returns
Type Description
string

setSelector

Selects the methods to which this rule applies.

Refer to selector for syntax details.

Parameter
Name Description
var string
Returns
Type Description
$this

getOauth

The requirements for OAuth credentials.

Returns
Type Description
OAuthRequirements|null

hasOauth

clearOauth

setOauth

The requirements for OAuth credentials.

Parameter
Name Description
var OAuthRequirements
Returns
Type Description
$this

getAllowWithoutCredential

If true, the service accepts API keys without any other credential.

This flag only applies to HTTP and gRPC requests.

Returns
Type Description
bool

setAllowWithoutCredential

If true, the service accepts API keys without any other credential.

This flag only applies to HTTP and gRPC requests.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRequirements

Requirements for additional authentication providers.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRequirements

Requirements for additional authentication providers.

Parameter
Name Description
var array<AuthRequirement>
Returns
Type Description
$this