Class: Keratin::AuthN::MockKeychain

Inherits:
Object
  • Object
show all
Defined in:
lib/keratin/authn/mock_keychain.rb

Instance Method Summary collapse

Constructor Details

#initializeMockKeychain

a temporary RSA key for the test suite.

generates the smallest (fastest) key possible for RS256



6
7
8
# File 'lib/keratin/authn/mock_keychain.rb', line 6

def initialize
  @keypair ||= OpenSSL::PKey::RSA.new(512).to_jwk
end

Instance Method Details

#[](_) ⇒ Object



14
15
16
# File 'lib/keratin/authn/mock_keychain.rb', line 14

def [](_)
  key
end

#keyObject



10
11
12
# File 'lib/keratin/authn/mock_keychain.rb', line 10

def key
  @keypair
end