NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWTaudiences. that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience "https://Service_name/API_name" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience "https://library-example.googleapis.com/google.example.library.v1.LibraryService". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com
NOTE: This will be deprecated soon, once AuthProvider.audiences is
implemented and accepted in all the runtime components.
The list of JWTaudiences.
that are allowed to access. A JWT containing any of these audiences will
be accepted. When this setting is absent, only JWTs with audience
"https://Service_name/API_name"
will be accepted. For example, if no audiences are in the setting,
LibraryService API will only accept JWTs with the following audience
"https://library-example.googleapis.com/google.example.library.v1.LibraryService".
Example:
audiences: bookstore_android.apps.googleusercontent.com,
bookstore_web.apps.googleusercontent.com
Returns
Type
Description
string
setAudiences
NOTE: This will be deprecated soon, once AuthProvider.audiences is
implemented and accepted in all the runtime components.
The list of JWTaudiences.
that are allowed to access. A JWT containing any of these audiences will
be accepted. When this setting is absent, only JWTs with audience
"https://Service_name/API_name"
will be accepted. For example, if no audiences are in the setting,
LibraryService API will only accept JWTs with the following audience
"https://library-example.googleapis.com/google.example.library.v1.LibraryService".
Example:
audiences: bookstore_android.apps.googleusercontent.com,
bookstore_web.apps.googleusercontent.com
[[["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 AuthRequirement (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.AuthRequirement)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.AuthRequirement)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.AuthRequirement)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.AuthRequirement)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.AuthRequirement)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.AuthRequirement) \nReference documentation and code samples for the Google API Common Protos Client class AuthRequirement.\n\nUser-defined authentication requirements, including support for\n[JSON Web Token\n(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).\n\nGenerated from protobuf message `google.api.AuthRequirement`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProviderId\n\n[id](/php/docs/reference/common-protos/latest/Api.AuthProvider#_Google_Api_AuthProvider__getId__) from authentication provider.\n\nExample:\nprovider_id: bookstore_auth\n\n### setProviderId\n\n[id](/php/docs/reference/common-protos/latest/Api.AuthProvider#_Google_Api_AuthProvider__getId__) from authentication provider.\n\nExample:\nprovider_id: bookstore_auth\n\n### getAudiences\n\nNOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://[Service_name](/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getName__)/[API_name](https://protobuf.dev/reference/php/api-docs/API_name)\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"\u003chttps://library-example.googleapis.com/google.example.library.v1.LibraryService\u003e\".\nExample:\naudiences: bookstore_android.apps.googleusercontent.com,\nbookstore_web.apps.googleusercontent.com\n\n### setAudiences\n\nNOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://[Service_name](/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getName__)/[API_name](https://protobuf.dev/reference/php/api-docs/API_name)\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"\u003chttps://library-example.googleapis.com/google.example.library.v1.LibraryService\u003e\".\nExample:\naudiences: bookstore_android.apps.googleusercontent.com,\nbookstore_web.apps.googleusercontent.com"]]