Class JwtLocation.Builder (2.40.0)

public static final class JwtLocation.Builder extends GeneratedMessageV3.Builder<JwtLocation.Builder> implements JwtLocationOrBuilder

Specifies a location to extract JWT from an API request.

Protobuf type google.api.JwtLocation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public JwtLocation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
JwtLocation.Builder
Overrides

build()

public JwtLocation build()
Returns
Type Description
JwtLocation

buildPartial()

public JwtLocation buildPartial()
Returns
Type Description
JwtLocation

clear()

public JwtLocation.Builder clear()
Returns
Type Description
JwtLocation.Builder
Overrides

clearCookie()

public JwtLocation.Builder clearCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public JwtLocation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
JwtLocation.Builder
Overrides

clearHeader()

public JwtLocation.Builder clearHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

clearIn()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public JwtLocation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
JwtLocation.Builder
Overrides

clearQuery()

public JwtLocation.Builder clearQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

clearValuePrefix()

public JwtLocation.Builder clearValuePrefix()

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
JwtLocation.Builder

This builder for chaining.

clone()

public JwtLocation.Builder clone()
Returns
Type Description
JwtLocation.Builder
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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(JwtLocation other)

public JwtLocation.Builder mergeFrom(JwtLocation other)
Parameter
Name Description
other JwtLocation
Returns
Type Description
JwtLocation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public JwtLocation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
JwtLocation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public JwtLocation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
JwtLocation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final JwtLocation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
JwtLocation.Builder
Overrides

setCookie(String value)

public JwtLocation.Builder setCookie(String value)

Specifies cookie name to extract JWT token.

string cookie = 4;

Parameter
Name Description
value String

The cookie to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setCookieBytes(ByteString value)

public JwtLocation.Builder setCookieBytes(ByteString value)

Specifies cookie name to extract JWT token.

string cookie = 4;

Parameter
Name Description
value ByteString

The bytes for cookie to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public JwtLocation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
JwtLocation.Builder
Overrides

setHeader(String value)

public JwtLocation.Builder setHeader(String value)

Specifies HTTP header name to extract JWT token.

string header = 1;

Parameter
Name Description
value String

The header to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setHeaderBytes(ByteString value)

public JwtLocation.Builder setHeaderBytes(ByteString value)

Specifies HTTP header name to extract JWT token.

string header = 1;

Parameter
Name Description
value ByteString

The bytes for header to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setQuery(String value)

public JwtLocation.Builder setQuery(String value)

Specifies URL query parameter name to extract JWT token.

string query = 2;

Parameter
Name Description
value String

The query to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public JwtLocation.Builder setQueryBytes(ByteString value)

Specifies URL query parameter name to extract JWT token.

string query = 2;

Parameter
Name Description
value ByteString

The bytes for query to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public JwtLocation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
JwtLocation.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final JwtLocation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
JwtLocation.Builder
Overrides

setValuePrefix(String value)

public JwtLocation.Builder setValuePrefix(String value)

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;

Parameter
Name Description
value String

The valuePrefix to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.

setValuePrefixBytes(ByteString value)

public JwtLocation.Builder setValuePrefixBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for valuePrefix to set.

Returns
Type Description
JwtLocation.Builder

This builder for chaining.