Add typ header back into JWT payload

ruby-jwt v2.0 removed the `typ` header in
cc41d53e00.

To ensure tokens don't get marked invalid during an upgrade,
add it back to ensure backwards compatibility.
This commit is contained in:
Stan Hu 2018-12-29 00:07:45 -08:00
parent 3648e280ba
commit 1aa420a1fd
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ module JSONWebToken
end
def encoded
JWT.encode(payload, secret, JWT_ALGORITHM)
JWT.encode(payload, secret, JWT_ALGORITHM, { typ: 'JWT' })
end
private