lib/jwt_keeper/token.rb in jwt_keeper-3.2.0 vs lib/jwt_keeper/token.rb in jwt_keeper-3.3.0
- old
+ new
@@ -15,9 +15,10 @@
iat: DateTime.now.to_i, # issued at
jti: SecureRandom.uuid # JWT ID
}
@claims.merge!(JWTKeeper.configuration.base_claims)
@claims.merge!(private_claims)
+ @claims[:exp] = @claims[:exp].to_i if @claims[:exp].is_a?(Time)
end
# Creates a new web token
# @param private_claims [Hash] the custom claims to encode
# @return [Token] token object