Sha256: bdb9d01f4681812303a3ec7dae8981e5203baad2846de7d58525700b95636c50

Contents?: true

Size: 785 Bytes

Versions: 3

Compression:

Stored size: 785 Bytes

Contents

# frozen_string_literal: true

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

module JWT
  module Configuration
    # @api private
    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

3 entries across 3 versions & 2 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/jwt-2.10.1/lib/jwt/configuration/jwk_configuration.rb
jwt-2.10.1 lib/jwt/configuration/jwk_configuration.rb
jwt-2.10.0 lib/jwt/configuration/jwk_configuration.rb