Class JwtLocation.Builder (2.26.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public JwtLocation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
JwtLocation.Builder
Overrides

build()

public JwtLocation build()
Returns
TypeDescription
JwtLocation

buildPartial()

public JwtLocation buildPartial()
Returns
TypeDescription
JwtLocation

clear()

public JwtLocation.Builder clear()
Returns
TypeDescription
JwtLocation.Builder
Overrides

clearCookie()

public JwtLocation.Builder clearCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
TypeDescription
JwtLocation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public JwtLocation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
JwtLocation.Builder
Overrides

clearHeader()

public JwtLocation.Builder clearHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
TypeDescription
JwtLocation.Builder

This builder for chaining.

clearIn()

public JwtLocation.Builder clearIn()
Returns
TypeDescription
JwtLocation.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public JwtLocation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
JwtLocation.Builder
Overrides

clearQuery()

public JwtLocation.Builder clearQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

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

This builder for chaining.

clone()

public JwtLocation.Builder clone()
Returns
TypeDescription
JwtLocation.Builder
Overrides

getCookie()

public String getCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
TypeDescription
String

The cookie.

getCookieBytes()

public ByteString getCookieBytes()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
TypeDescription
ByteString

The bytes for cookie.

getDefaultInstanceForType()

public JwtLocation getDefaultInstanceForType()
Returns
TypeDescription
JwtLocation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHeader()

public String getHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
TypeDescription
String

The header.

getHeaderBytes()

public ByteString getHeaderBytes()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
TypeDescription
ByteString

The bytes for header.

getInCase()

public JwtLocation.InCase getInCase()
Returns
TypeDescription
JwtLocation.InCase

getQuery()

public String getQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
TypeDescription
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for valuePrefix.

hasCookie()

public boolean hasCookie()

Specifies cookie name to extract JWT token.

string cookie = 4;

Returns
TypeDescription
boolean

Whether the cookie field is set.

hasHeader()

public boolean hasHeader()

Specifies HTTP header name to extract JWT token.

string header = 1;

Returns
TypeDescription
boolean

Whether the header field is set.

hasQuery()

public boolean hasQuery()

Specifies URL query parameter name to extract JWT token.

string query = 2;

Returns
TypeDescription
boolean

Whether the query field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(JwtLocation other)

public JwtLocation.Builder mergeFrom(JwtLocation other)
Parameter
NameDescription
otherJwtLocation
Returns
TypeDescription
JwtLocation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public JwtLocation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
JwtLocation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public JwtLocation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
JwtLocation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final JwtLocation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
JwtLocation.Builder
Overrides

setCookie(String value)

public JwtLocation.Builder setCookie(String value)

Specifies cookie name to extract JWT token.

string cookie = 4;

Parameter
NameDescription
valueString

The cookie to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for cookie to set.

Returns
TypeDescription
JwtLocation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public JwtLocation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
JwtLocation.Builder
Overrides

setHeader(String value)

public JwtLocation.Builder setHeader(String value)

Specifies HTTP header name to extract JWT token.

string header = 1;

Parameter
NameDescription
valueString

The header to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for header to set.

Returns
TypeDescription
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
NameDescription
valueString

The query to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for query to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
JwtLocation.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final JwtLocation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The valuePrefix to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for valuePrefix to set.

Returns
TypeDescription
JwtLocation.Builder

This builder for chaining.