Skip to content

Commit

Permalink
Merge pull request #325 from anakinj/remove-forwardable-dependency
Browse files Browse the repository at this point in the history
Removed forwardable dependency
  • Loading branch information
excpt committed Sep 16, 2019
2 parents cb38890 + ecf3f67 commit a269358
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/jwt/jwk/rsa.rb
@@ -1,16 +1,10 @@
# frozen_string_literal: true

require 'forwardable'

module JWT
module JWK
class RSA
extend Forwardable

attr_reader :keypair

def_delegators :keypair, :private?, :public_key

BINARY = 2
KTY = 'RSA'.freeze

Expand All @@ -20,6 +14,14 @@ def initialize(keypair)
@keypair = keypair
end

def private?
keypair.private?
end

def public_key
keypair.public_key
end

def kid
sequence = OpenSSL::ASN1::Sequence([OpenSSL::ASN1::Integer.new(public_key.n),
OpenSSL::ASN1::Integer.new(public_key.e)])
Expand Down

0 comments on commit a269358

Please sign in to comment.