Reference documentation and code samples for the Google API Common Protos Client class JwtLocation.
Specifies a location to extract JWT from an API request.
Generated from protobuf messagegoogle.api.JwtLocation
Namespace
Google \ Api
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ header
string
Specifies HTTP header name to extract JWT token.
↳ query
string
Specifies URL query parameter name to extract JWT token.
↳ cookie
string
Specifies cookie name to extract JWT token.
↳ value_prefix
string
The value prefix. The value format is "value_prefix{token}" Only applies to "in" header type. Must be empty for "in" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for "Authorization: Bearer {JWT}", value_prefix="Bearer " with a space at the end.
getHeader
Specifies HTTP header name to extract JWT token.
Returns
Type
Description
string
hasHeader
setHeader
Specifies HTTP header name to extract JWT token.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getQuery
Specifies URL query parameter name to extract JWT token.
Returns
Type
Description
string
hasQuery
setQuery
Specifies URL query parameter name to extract JWT token.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCookie
Specifies cookie name to extract JWT token.
Returns
Type
Description
string
hasCookie
setCookie
Specifies cookie name to extract JWT token.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getValuePrefix
The value prefix. The value format is "value_prefix{token}"
Only applies to "in" header type. Must be empty for "in" query type.
If not empty, the header value has to match (case sensitive) this prefix.
If not matched, JWT will not be extracted. If matched, JWT will be
extracted after the prefix is removed.
For example, for "Authorization: Bearer {JWT}",
value_prefix="Bearer " with a space at the end.
Returns
Type
Description
string
setValuePrefix
The value prefix. The value format is "value_prefix{token}"
Only applies to "in" header type. Must be empty for "in" query type.
If not empty, the header value has to match (case sensitive) this prefix.
If not matched, JWT will not be extracted. If matched, JWT will be
extracted after the prefix is removed.
For example, for "Authorization: Bearer {JWT}",
value_prefix="Bearer " with a space at the end.
[[["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 JwtLocation (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.JwtLocation)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.JwtLocation)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.JwtLocation)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.JwtLocation)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.JwtLocation)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.JwtLocation) \nReference documentation and code samples for the Google API Common Protos Client class JwtLocation.\n\nSpecifies a location to extract JWT from an API request.\n\nGenerated from protobuf message `google.api.JwtLocation`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHeader\n\nSpecifies HTTP header name to extract JWT token.\n\n### hasHeader\n\n### setHeader\n\nSpecifies HTTP header name to extract JWT token.\n\n### getQuery\n\nSpecifies URL query parameter name to extract JWT token.\n\n### hasQuery\n\n### setQuery\n\nSpecifies URL query parameter name to extract JWT token.\n\n### getCookie\n\nSpecifies cookie name to extract JWT token.\n\n### hasCookie\n\n### setCookie\n\nSpecifies cookie name to extract JWT token.\n\n### getValuePrefix\n\nThe value prefix. The value format is \"value_prefix{token}\"\nOnly applies to \"in\" header type. Must be empty for \"in\" query type.\n\nIf not empty, the header value has to match (case sensitive) this prefix.\nIf not matched, JWT will not be extracted. If matched, JWT will be\nextracted after the prefix is removed.\nFor example, for \"Authorization: Bearer {JWT}\",\nvalue_prefix=\"Bearer \" with a space at the end.\n\n### setValuePrefix\n\nThe value prefix. The value format is \"value_prefix{token}\"\nOnly applies to \"in\" header type. Must be empty for \"in\" query type.\n\nIf not empty, the header value has to match (case sensitive) this prefix.\nIf not matched, JWT will not be extracted. If matched, JWT will be\nextracted after the prefix is removed.\nFor example, for \"Authorization: Bearer {JWT}\",\nvalue_prefix=\"Bearer \" with a space at the end.\n\n### getIn"]]