Skip to content

Add typ, cty fields in the JWT header

Pre-release
Pre-release
Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 25 Jun 18:10
b5b711f
This patch was authored by @Maxim-Inv and released by @tanner0101.

Adds typ and cty fields to the JWT header (#25, fixes #5).

  • Add typ header as parameter making "JWT" the default.

  • Allow setting cty during JWT signing.

let signer = JWTSigner.hs256(key: keyData)`
let token = try signer.sign(payload, cty: "twilio-fpa;v=1")