Class JwtLocation (2.10.0)

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()

public JwtLocation()

JwtLocation(JwtLocation)

public JwtLocation(JwtLocation other)
Parameter
NameDescription
otherJwtLocation

Fields

CookieFieldNumber

public const int CookieFieldNumber = 4

Field number for the "cookie" field.

Field Value
TypeDescription
int

HeaderFieldNumber

public const int HeaderFieldNumber = 1

Field number for the "header" field.

Field Value
TypeDescription
int

QueryFieldNumber

public const int QueryFieldNumber = 2

Field number for the "query" field.

Field Value
TypeDescription
int

ValuePrefixFieldNumber

public const int ValuePrefixFieldNumber = 3

Field number for the "value_prefix" field.

Field Value
TypeDescription
int

Properties

public string Cookie { get; set; }

Specifies cookie name to extract JWT token.

Property Value
TypeDescription
string

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
MessageDescriptor

HasCookie

public bool HasCookie { get; }

Gets whether the "cookie" field is set

Property Value
TypeDescription
bool

HasHeader

public bool HasHeader { get; }

Gets whether the "header" field is set

Property Value
TypeDescription
bool

HasQuery

public bool HasQuery { get; }

Gets whether the "query" field is set

Property Value
TypeDescription
bool

Header

public string Header { get; set; }

Specifies HTTP header name to extract JWT token.

Property Value
TypeDescription
string

InCase

public JwtLocation.InOneofCase InCase { get; }
Property Value
TypeDescription
JwtLocationInOneofCase

Parser

public static MessageParser<JwtLocation> Parser { get; }
Property Value
TypeDescription
MessageParserJwtLocation

Query

public string Query { get; set; }

Specifies URL query parameter name to extract JWT token.

Property Value
TypeDescription
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
TypeDescription
string

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
int

ClearCookie()

public void ClearCookie()

Clears the value of the oneof if it's currently set to "cookie"

ClearHeader()

public void ClearHeader()

Clears the value of the oneof if it's currently set to "header"

ClearIn()

public void ClearIn()

ClearQuery()

public void ClearQuery()

Clears the value of the oneof if it's currently set to "query"

Clone()

public JwtLocation Clone()
Returns
TypeDescription
JwtLocation

Equals(JwtLocation)

public bool Equals(JwtLocation other)
Parameter
NameDescription
otherJwtLocation
Returns
TypeDescription
bool

Equals(object)

public override bool Equals(object other)
Parameter
NameDescription
otherobject
Returns
TypeDescription
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

MergeFrom(JwtLocation)

public void MergeFrom(JwtLocation other)
Parameter
NameDescription
otherJwtLocation

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream