class AuthenticationRule extends Message

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

Methods

__construct()

No description

string
getSelector()

Selects the methods to which this rule applies.

$this
setSelector(string $var)

Selects the methods to which this rule applies.

getOauth()

The requirements for OAuth credentials.

$this
setOauth(OAuthRequirements $var)

The requirements for OAuth credentials.

bool
getAllowWithoutCredential()

Whether to allow requests without a credential. The credential can be an OAuth token, Google cookies (first-party auth) or EndUserCreds.

$this
setAllowWithoutCredential(bool $var)

Whether to allow requests without a credential. The credential can be an OAuth token, Google cookies (first-party auth) or EndUserCreds.

RepeatedField
getRequirements()

Requirements for additional authentication providers.

$this
setRequirements(AuthRequirement[]|RepeatedField $var)

Requirements for additional authentication providers.

Details

at line 55
__construct()

at line 67
string getSelector()

Selects the methods to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

Generated from protobuf field string selector = 1;

Return Value

string

at line 80
$this setSelector(string $var)

Selects the methods to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

Generated from protobuf field string selector = 1;

Parameters

string $var

Return Value

$this

at line 94
OAuthRequirements getOauth()

The requirements for OAuth credentials.

Generated from protobuf field .google.api.OAuthRequirements oauth = 2;

Return Value

OAuthRequirements

at line 106
$this setOauth(OAuthRequirements $var)

The requirements for OAuth credentials.

Generated from protobuf field .google.api.OAuthRequirements oauth = 2;

Parameters

OAuthRequirements $var

Return Value

$this

at line 125
bool getAllowWithoutCredential()

Whether to allow requests without a credential. The credential can be an OAuth token, Google cookies (first-party auth) or EndUserCreds.

For requests without credentials, if the service control environment is specified, each incoming request must be associated with a service consumer. This can be done by passing an API key that belongs to a consumer project.

Generated from protobuf field bool allow_without_credential = 5;

Return Value

bool

at line 142
$this setAllowWithoutCredential(bool $var)

Whether to allow requests without a credential. The credential can be an OAuth token, Google cookies (first-party auth) or EndUserCreds.

For requests without credentials, if the service control environment is specified, each incoming request must be associated with a service consumer. This can be done by passing an API key that belongs to a consumer project.

Generated from protobuf field bool allow_without_credential = 5;

Parameters

bool $var

Return Value

$this

at line 156
RepeatedField getRequirements()

Requirements for additional authentication providers.

Generated from protobuf field repeated .google.api.AuthRequirement requirements = 7;

Return Value

RepeatedField

at line 168
$this setRequirements(AuthRequirement[]|RepeatedField $var)

Requirements for additional authentication providers.

Generated from protobuf field repeated .google.api.AuthRequirement requirements = 7;

Parameters

AuthRequirement[]|RepeatedField $var

Return Value

$this