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:
parent
34f51dee0d
commit
c6d7130f65
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue