Send feedback
Class JwtLocation (2.10.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.10.0 keyboard_arrow_down
public sealed class JwtLocation : IMessage<JwtLocation>, IEquatable<JwtLocation>, IDeepCloneable<JwtLocation>, IBufferMessage, IMessage
Specifies a location to extract JWT from an API request.
Inheritance
object >
JwtLocation
Namespace
Google.Api
Assembly
Google.Api.CommonProtos.dll
Constructors
JwtLocation()
JwtLocation(JwtLocation)
public JwtLocation(JwtLocation other)
Fields
CookieFieldNumber
public const int CookieFieldNumber = 4
Field number for the "cookie" field.
Field Value
Type
Description
int
public const int HeaderFieldNumber = 1
Field number for the "header" field.
Field Value
Type
Description
int
QueryFieldNumber
public const int QueryFieldNumber = 2
Field number for the "query" field.
Field Value
Type
Description
int
ValuePrefixFieldNumber
public const int ValuePrefixFieldNumber = 3
Field number for the "value_prefix" field.
Field Value
Type
Description
int
Properties
Cookie
public string Cookie { get; set; }
Specifies cookie name to extract JWT token.
Property Value
Type
Description
string
Descriptor
public static MessageDescriptor Descriptor { get; }
HasCookie
public bool HasCookie { get; }
Gets whether the "cookie" field is set
Property Value
Type
Description
bool
public bool HasHeader { get; }
Gets whether the "header" field is set
Property Value
Type
Description
bool
HasQuery
public bool HasQuery { get; }
Gets whether the "query" field is set
Property Value
Type
Description
bool
public string Header { get; set; }
Specifies HTTP header name to extract JWT token.
Property Value
Type
Description
string
InCase
public JwtLocation.InOneofCase InCase { get; }
Parser
public static MessageParser<JwtLocation> Parser { get; }
Query
public string Query { get; set; }
Specifies URL query parameter name to extract JWT token.
Property Value
Type
Description
string
ValuePrefix
public string ValuePrefix { get; set; }
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.
Property Value
Type
Description
string
Methods
CalculateSize()
public int CalculateSize()
Returns
Type
Description
int
ClearCookie()
public void ClearCookie()
Clears the value of the oneof if it's currently set to "cookie"
public void ClearHeader()
Clears the value of the oneof if it's currently set to "header"
ClearIn()
ClearQuery()
Clears the value of the oneof if it's currently set to "query"
Clone()
public JwtLocation Clone()
Equals(JwtLocation)
public bool Equals(JwtLocation other)
Returns
Type
Description
bool
Equals(object)
public override bool Equals(object other)
Parameter
Name
Description
other
object
Returns
Type
Description
bool
Overrides
GetHashCode()
public override int GetHashCode()
Returns
Type
Description
int
Overrides
MergeFrom(JwtLocation)
public void MergeFrom(JwtLocation other)
public void MergeFrom(CodedInputStream input)
ToString()
public override string ToString()
Returns
Type
Description
string
Overrides
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-26 UTC.
Need to tell us more?
[[["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 2024-11-26 UTC."],[],[]]