authentikat-jwt
authentikat-jwt copied to clipboard
JwtHeader should include optional param "kid" (key id)
In the case where the public key is looked up from a map of kid -> publicKeys
, is it possible to parse the kid
from the Jwt Header for that map?
The so-called "kid" parameter: http://self-issued.info/docs/draft-jones-json-web-token-01.html#ReservedClaimName
Currently I only see the following Header params in the latest master build:
algorithm
, contentType
, typ
I would work around this by extending JwtHeader
to include kid
, but it does not inherit from a base trait and scala prohibits inheriting directly from another case class.
The only possible workaround I've found is copying and pasting the encoding apply
statement into a separate object that allows my header content. Because the kid
can be extracted separately in my own logic to deduce the key
, the JsomWebToken.validate()
can then be used as usual.
The kid
parameter is not part of JWT is it? See https://tools.ietf.org/html/rfc7519
The link you are referencing is a draft of the spec.