Closed
Description
Description
According to https://tools.ietf.org/html/rfc7518#section-3.6, jws s "MUST NOT accept such objects as valid unless the application specifies that it is acceptable for a specific object to not be integrity protected"
Reproduction
> var token = jwt.sign({'a':1}, 'asdf', { algorithm: 'none'})
undefined
> jwt.verify(token)
{ a: 1, iat: 1587359376 }
maybe we should add some kind of switch options?
Expected output:
> var token = jwt.sign({'a':1}, 'asdf', { algorithm: 'none'})
undefined
> jwt.verify(token)
throws error
> jwt.verify(token, '', { algorithm: 'none'})
{ a: 1, iat: 1587359376 }