Skip to content

Commit 0531d39

Browse files
authored
Merge pull request #81 from nov/amatsuda-warnings
⚠️ method redefined; discarding old header, signature_base_str…
2 parents 03c73a5 + b258297 commit 0531d39

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/json/jose.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module JOSE
99
register_header_keys :alg, :jku, :jwk, :x5u, :x5t, :x5c, :kid, :typ, :cty, :crit
1010
alias_method :algorithm, :alg
1111

12-
attr_accessor :header
12+
attr_writer :header
1313
def header
1414
@header ||= {}
1515
end

lib/json/jwe.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class UnexpectedAlgorithm < JWT::UnexpectedAlgorithm; end
1414

1515
attr_accessor(
1616
:public_key_or_secret, :private_key_or_secret,
17-
:plain_text, :cipher_text, :authentication_tag, :iv, :auth_data,
18-
:content_encryption_key, :jwe_encrypted_key, :encryption_key, :mac_key
17+
:plain_text, :cipher_text, :iv, :auth_data,
18+
:content_encryption_key, :encryption_key, :mac_key
1919
)
20+
attr_writer :jwe_encrypted_key, :authentication_tag
2021

2122
register_header_keys :enc, :epk, :zip, :apu, :apv
2223
alias_method :encryption_method, :enc

lib/json/jws.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class UnexpectedAlgorithm < JWT::UnexpectedAlgorithm; end
66

77
NUM_OF_SEGMENTS = 3
88

9-
attr_accessor :signature_base_string
9+
attr_writer :signature_base_string
1010

1111
def initialize(jwt)
1212
update jwt

0 commit comments

Comments
 (0)