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(array $data = NULL)

Constructor.

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()

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

$this
setAllowWithoutCredential(bool $var)

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

RepeatedField
getRequirements()

Requirements for additional authentication providers.

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

Requirements for additional authentication providers.

Details

at line 67
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type string $selector
      Selects the methods to which this rule applies.
      Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
@type \Google\Api\OAuthRequirements $oauth
      The requirements for OAuth credentials.
@type bool $allow_without_credential
      If true, the service accepts API keys without any other credential.
@type \Google\Api\AuthRequirement[]|\Google\Protobuf\Internal\RepeatedField $requirements
      Requirements for additional authentication providers.

}

at line 79
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 92
$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 106
OAuthRequirements getOauth()

The requirements for OAuth credentials.

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

Return Value

OAuthRequirements

at line 118
$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 132
bool getAllowWithoutCredential()

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

Generated from protobuf field bool allow_without_credential = 5;

Return Value

bool

at line 144
$this setAllowWithoutCredential(bool $var)

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

Generated from protobuf field bool allow_without_credential = 5;

Parameters

bool $var

Return Value

$this

at line 158
RepeatedField getRequirements()

Requirements for additional authentication providers.

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

Return Value

RepeatedField

at line 170
$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