Sha256: d70ece14415e6bb4e7a7acfcdf534065f71ac2282cb3b470556189be0441e052

Contents?: true

Size: 745 Bytes

Versions: 7

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

require_relative '../jwk/kid_as_key_digest'
require_relative '../jwk/thumbprint'

module JWT
  module Configuration
    class JwkConfiguration
      def initialize
        self.kid_generator_type = :key_digest
      end

      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

      attr_accessor :kid_generator
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
jwt-2.8.1 lib/jwt/configuration/jwk_configuration.rb
jwt-2.8.0 lib/jwt/configuration/jwk_configuration.rb
jwt-2.7.1 lib/jwt/configuration/jwk_configuration.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/jwt-2.7.0/lib/jwt/configuration/jwk_configuration.rb
jwt-2.7.0 lib/jwt/configuration/jwk_configuration.rb
jwt-2.6.0 lib/jwt/configuration/jwk_configuration.rb
jwt-2.5.0 lib/jwt/configuration/jwk_configuration.rb