Class: JWT::JWK::KeyBase

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/jwk/key_base.rb

Direct Known Subclasses

EC, HMAC, RSA

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keypair, kid = nil) ⇒ KeyBase

Returns a new instance of KeyBase.



8
9
10
11
# File 'lib/jwt/jwk/key_base.rb', line 8

def initialize(keypair, kid = nil)
  @keypair = keypair
  @kid     = kid
end

Instance Attribute Details

#keypairObject (readonly)

Returns the value of attribute keypair.



6
7
8
# File 'lib/jwt/jwk/key_base.rb', line 6

def keypair
  @keypair
end

#kidObject (readonly)

Returns the value of attribute kid.



6
7
8
# File 'lib/jwt/jwk/key_base.rb', line 6

def kid
  @kid
end

Class Method Details

.inherited(klass) ⇒ Object



13
14
15
# File 'lib/jwt/jwk/key_base.rb', line 13

def self.inherited(klass)
  ::JWT::JWK.classes << klass
end