lib/json/jwt.rb in json-jwt-1.6.2 vs lib/json/jwt.rb in json-jwt-1.6.3

- old
+ new

@@ -32,10 +32,10 @@ # I'd like to make :RS256 default. # However, by histrical reasons, :HS256 was default. # This code is needed to keep legacy behavior. algorithm = private_key_or_secret.is_a?(String) ? :HS256 : :RS256 end - jws = JWS.new self.dup + jws = JWS.new self jws.kid ||= private_key_or_secret[:kid] if private_key_or_secret.is_a? JSON::JWK jws.alg = algorithm jws.sign! private_key_or_secret end \ No newline at end of file