Skip to content

JwtHeader should include optional param "kid" (key id) #35

@evbo

Description

@evbo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions