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
1 changed files with 2 additions and 1 deletions

View File

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