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-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eJwtLocation\u003c/code\u003e is a class that specifies where to extract a JWT from an API request, including options like header, cookie, or query parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eJwtLocation\u003c/code\u003e offers constructors for creating new instances and copying existing ones, alongside methods for calculation, cloning, merging, and setting or getting values.\u003c/p\u003e\n"],["\u003cp\u003eKey fields and properties within \u003ccode\u003eJwtLocation\u003c/code\u003e include \u003ccode\u003eCookie\u003c/code\u003e, \u003ccode\u003eHeader\u003c/code\u003e, \u003ccode\u003eQuery\u003c/code\u003e, and \u003ccode\u003eValuePrefix\u003c/code\u003e, which define how and where the JWT is located in the request.\u003c/p\u003e\n"],["\u003cp\u003eThere are different versions available for the \u003ccode\u003eJwtLocation\u003c/code\u003e class, including the latest version 2.15.0 and older versions such as 2.10.0 and 2.2.0.\u003c/p\u003e\n"]]],[],null,["# Class JwtLocation (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JwtLocation)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Api.JwtLocation)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Api.JwtLocation)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Api.JwtLocation) \n\n public sealed class JwtLocation : IMessage\u003cJwtLocation\u003e, IEquatable\u003cJwtLocation\u003e, IDeepCloneable\u003cJwtLocation\u003e, IBufferMessage, IMessage\n\nSpecifies a location to extract JWT from an API request. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e JwtLocation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[JwtLocation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JwtLocation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[JwtLocation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JwtLocation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[JwtLocation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.JwtLocation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Api](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### JwtLocation()\n\n public JwtLocation()\n\n### JwtLocation(JwtLocation)\n\n public JwtLocation(JwtLocation other)\n\nFields\n------\n\n### CookieFieldNumber\n\n public const int CookieFieldNumber = 4\n\nField number for the \"cookie\" field.\n\n### HeaderFieldNumber\n\n public const int HeaderFieldNumber = 1\n\nField number for the \"header\" field.\n\n### QueryFieldNumber\n\n public const int QueryFieldNumber = 2\n\nField number for the \"query\" field.\n\n### ValuePrefixFieldNumber\n\n public const int ValuePrefixFieldNumber = 3\n\nField number for the \"value_prefix\" field.\n\nProperties\n----------\n\n### Cookie\n\n public string Cookie { get; set; }\n\nSpecifies cookie name to extract JWT token.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### HasCookie\n\n public bool HasCookie { get; }\n\nGets whether the \"cookie\" field is set\n\n### HasHeader\n\n public bool HasHeader { get; }\n\nGets whether the \"header\" field is set\n\n### HasQuery\n\n public bool HasQuery { get; }\n\nGets whether the \"query\" field is set\n\n### Header\n\n public string Header { get; set; }\n\nSpecifies HTTP header name to extract JWT token.\n\n### InCase\n\n public JwtLocation.InOneofCase InCase { get; }\n\n### Parser\n\n public static MessageParser\u003cJwtLocation\u003e Parser { get; }\n\n### Query\n\n public string Query { get; set; }\n\nSpecifies URL query parameter name to extract JWT token.\n\n### ValuePrefix\n\n public string ValuePrefix { get; set; }\n\nThe value prefix. The value format is \"value_prefix{token}\"\nOnly applies to \"in\" header type. Must be empty for \"in\" query type.\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.\n\nFor example, for \"Authorization: Bearer {JWT}\",\nvalue_prefix=\"Bearer \" with a space at the end.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### ClearCookie()\n\n public void ClearCookie()\n\nClears the value of the oneof if it's currently set to \"cookie\"\n\n### ClearHeader()\n\n public void ClearHeader()\n\nClears the value of the oneof if it's currently set to \"header\"\n\n### ClearIn()\n\n public void ClearIn()\n\n### ClearQuery()\n\n public void ClearQuery()\n\nClears the value of the oneof if it's currently set to \"query\"\n\n### Clone()\n\n public JwtLocation Clone()\n\n### Equals(JwtLocation)\n\n public bool Equals(JwtLocation other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(JwtLocation)\n\n public void MergeFrom(JwtLocation other)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]