Sha256: b6f51f5fcdba9999f9db1e0866995b308dbb2de168f7737152c5d003badd585c

Contents?: true

Size: 317 Bytes

Versions: 4

Compression:

Stored size: 317 Bytes

Contents

module Keratin::AuthN
  class MockKeychain
    # a temporary RSA key for the test suite.
    #
    # generates the smallest (fastest) key possible for RS256
    def initialize
      @keypair ||= OpenSSL::PKey::RSA.new(512).to_jwk
    end

    def key
      @keypair
    end

    def [](_)
      key
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
keratin-authn-1.0.4 lib/keratin/authn/mock_keychain.rb
keratin-authn-1.0.3 lib/keratin/authn/mock_keychain.rb
keratin-authn-1.0.2 lib/keratin/authn/mock_keychain.rb
keratin-authn-1.0.1 lib/keratin/authn/mock_keychain.rb