Class: Google::Apis::ServiceusageV1::JwtLocation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/serviceusage_v1/classes.rb,
lib/google/apis/serviceusage_v1/representations.rb,
lib/google/apis/serviceusage_v1/representations.rb

Overview

Specifies a location to extract JWT from an API request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JwtLocation

Returns a new instance of JwtLocation.



2540
2541
2542
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2540

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

Specifies cookie name to extract JWT token. Corresponds to the JSON property cookie

Returns:

  • (String)


2518
2519
2520
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2518

def cookie
  @cookie
end

#headerString

Specifies HTTP header name to extract JWT token. Corresponds to the JSON property header

Returns:

  • (String)


2523
2524
2525
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2523

def header
  @header
end

#queryString

Specifies URL query parameter name to extract JWT token. Corresponds to the JSON property query

Returns:

  • (String)


2528
2529
2530
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2528

def query
  @query
end

#value_prefixString

The value prefix. The value format is "value_prefixtoken" 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. Corresponds to the JSON property valuePrefix

Returns:

  • (String)


2538
2539
2540
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2538

def value_prefix
  @value_prefix
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2545
2546
2547
2548
2549
2550
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2545

def update!(**args)
  @cookie = args[:cookie] if args.key?(:cookie)
  @header = args[:header] if args.key?(:header)
  @query = args[:query] if args.key?(:query)
  @value_prefix = args[:value_prefix] if args.key?(:value_prefix)
end