lib/json/jwt.rb in json-jwt-1.16.6 vs lib/json/jwt.rb in json-jwt-1.16.7

- old
+ new

@@ -24,16 +24,16 @@ def initialize(claims = {}) @content_type = 'application/jwt' self.typ = :JWT self.alg = :none + update claims unless claims.nil? [:exp, :nbf, :iat].each do |key| - claims[key] = claims[key].to_i if claims[key] + self[key] = self[key].to_i if self[key] end end - update claims end def sign(private_key_or_secret, algorithm = :autodetect) jws = JWS.new self jws.kid ||= private_key_or_secret[:kid] if private_key_or_secret.is_a? JSON::JWK @@ -140,6 +140,6 @@ require 'json/jws' require 'json/jwe' require 'json/jwk' require 'json/jwk/jwkizable' require 'json/jwk/set' -require 'json/jwk/set/fetcher' \ No newline at end of file +require 'json/jwk/set/fetcher'