Class JwtLocation (2.38.0)

public final class JwtLocation extends GeneratedMessageV3 implements JwtLocationOrBuilder

Specifies a location to extract JWT from an API request.

Protobuf type google.api.JwtLocation

Static Fields

public static final int COOKIE_FIELD_NUMBER
Field Value
Type Description
int

HEADER_FIELD_NUMBER

public static final int HEADER_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

VALUE_PREFIX_FIELD_NUMBER

public static final int VALUE_PREFIX_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static JwtLocation getDefaultInstance()
Returns
Type Description
JwtLocation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static JwtLocation.Builder newBuilder()
Returns
Type Description
JwtLocation.Builder

newBuilder(JwtLocation prototype)

public static JwtLocation.Builder newBuilder(JwtLocation prototype)
Parameter
Name Description
prototype JwtLocation
Returns
Type Description
JwtLocation.Builder

parseDelimitedFrom(InputStream input)

public static JwtLocation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static JwtLocation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static JwtLocation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static JwtLocation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static JwtLocation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static JwtLocation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static JwtLocation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<JwtLocation> parser()
Returns
Type Description
Parser<JwtLocation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCookie()

public String getCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
Type Description
String

The cookie.

getCookieBytes()

public ByteString getCookieBytes()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
Type Description
ByteString

The bytes for cookie.

getDefaultInstanceForType()

public JwtLocation getDefaultInstanceForType()
Returns
Type Description
JwtLocation

getHeader()

public String getHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
Type Description
String

The header.

getHeaderBytes()

public ByteString getHeaderBytes()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
Type Description
ByteString

The bytes for header.

getInCase()

public JwtLocation.InCase getInCase()
Returns
Type Description
JwtLocation.InCase

getParserForType()

public Parser<JwtLocation> getParserForType()
Returns
Type Description
Parser<JwtLocation>
Overrides

getQuery()

public String getQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
Type Description
ByteString

The bytes for query.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getValuePrefix()

public String 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.

string value_prefix = 3;

Returns
Type Description
String

The valuePrefix.

getValuePrefixBytes()

public ByteString getValuePrefixBytes()

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.

string value_prefix = 3;

Returns
Type Description
ByteString

The bytes for valuePrefix.

hasCookie()

public boolean hasCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
Type Description
boolean

Whether the cookie field is set.

hasHeader()

public boolean hasHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
Type Description
boolean

Whether the header field is set.

hasQuery()

public boolean hasQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
Type Description
boolean

Whether the query field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public JwtLocation.Builder newBuilderForType()
Returns
Type Description
JwtLocation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected JwtLocation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
JwtLocation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public JwtLocation.Builder toBuilder()
Returns
Type Description
JwtLocation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException