lib/json/jwt.rb in json-jwt-0.5.1 vs lib/json/jwt.rb in json-jwt-0.5.2
- old
+ new
@@ -93,10 +93,10 @@
jwt.verify signature_base_string, key_or_secret unless key_or_secret == :skip_verification
jwt
when 4 # JWE
jwe = JWE.new jwt_string
jwe.header = MultiJson.load(
- jwt_string.split('.').first
+ UrlSafeBase64.decode64 jwt_string.split('.').first
).with_indifferent_access
jwe.decrypt! key_or_secret
else
raise InvalidFormat.new('Invalid JWT Format. JWT should include 2 or 3 dots.')
end