Set typ field in JSONWebToken::RSAToken

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 07:37:08 -08:00
parent 34f51dee0d
commit c6d7130f65

View file

@ -11,7 +11,8 @@ module JSONWebToken
def encoded def encoded
headers = { headers = {
kid: kid kid: kid,
typ: 'JWT'
} }
JWT.encode(payload, key, 'RS256', headers) JWT.encode(payload, key, 'RS256', headers)
end end