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 messagegoogle.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 toselectorfor syntax details.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class AuthenticationRule (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.AuthenticationRule)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.AuthenticationRule)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.AuthenticationRule)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.AuthenticationRule)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.AuthenticationRule)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.AuthenticationRule) \nReference documentation and code samples for the Google API Common Protos Client class AuthenticationRule.\n\nAuthentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\nIf a method doesn't have any auth requirements, request credentials will be\nignored.\n\nGenerated from protobuf message `google.api.AuthenticationRule`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSelector\n\nSelects the methods to which this rule applies.\n\nRefer to [selector](/php/docs/reference/common-protos/latest/Api.DocumentationRule#_Google_Api_DocumentationRule__getSelector__) for syntax\ndetails.\n\n### setSelector\n\nSelects the methods to which this rule applies.\n\nRefer to [selector](/php/docs/reference/common-protos/latest/Api.DocumentationRule#_Google_Api_DocumentationRule__getSelector__) for syntax\ndetails.\n\n### getOauth\n\nThe requirements for OAuth credentials.\n\n### hasOauth\n\n### clearOauth\n\n### setOauth\n\nThe requirements for OAuth credentials.\n\n### getAllowWithoutCredential\n\nIf true, the service accepts API keys without any other credential.\n\nThis flag only applies to HTTP and gRPC requests.\n\n### setAllowWithoutCredential\n\nIf true, the service accepts API keys without any other credential.\n\nThis flag only applies to HTTP and gRPC requests.\n\n### getRequirements\n\nRequirements for additional authentication providers.\n\n### setRequirements\n\nRequirements for additional authentication providers."]]