Class: JWT::Configuration::JwkConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/configuration/jwk_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJwkConfiguration

Returns a new instance of JwkConfiguration.



9
10
11
# File 'lib/jwt/configuration/jwk_configuration.rb', line 9

def initialize
  self.kid_generator_type = :key_digest
end

Instance Attribute Details

#kid_generatorObject

Returns the value of attribute kid_generator.



24
25
26
# File 'lib/jwt/configuration/jwk_configuration.rb', line 24

def kid_generator
  @kid_generator
end

Instance Method Details

#kid_generator_type=(value) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/jwt/configuration/jwk_configuration.rb', line 13

def kid_generator_type=(value)
  self.kid_generator = case value
                       when :key_digest
                         JWT::JWK::KidAsKeyDigest
                       when :rfc7638_thumbprint
                         JWT::JWK::Thumbprint
                       else
                         raise ArgumentError, "#{value} is not a valid kid generator type."
                       end
end