Skip to content

Releases: vapor/jwt-kit

Add support for Apple Silicon

17 Jul 15:50
8c9f67a
Compare
Choose a tag to compare
Pre-release
This patch was authored by @0xTim and released by @tanner0101.

Adds support for Apple Silicon (#32).

Boring SSL update

17 Jul 15:15
fa439a7
Compare
Choose a tag to compare
Boring SSL update Pre-release
Pre-release
This patch was authored by @0xTim and released by @tanner0101.

Brings in the latest version of BoringSSL (#31).

Add typ, cty fields in the JWT header

25 Jun 18:10
b5b711f
Compare
Choose a tag to compare
Pre-release
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")

Migrate HMAC to Crypto

16 Apr 14:45
b5aa3d4
Compare
Choose a tag to compare
Pre-release
This patch was authored and released by @0xTim.

Migrate all the HMAC code away from BoringSSL to Swift Crypto (#24).

Create a generic `JWTMultiValueClaim` protocol

23 Mar 21:52
c411158
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.
  • Allows much simpler implementation of JWT claims with multiple values.
  • Switches to this implementation for AudienceClaim

Give `AudienceClaim` more powers

16 Mar 22:53
3387c16
Compare
Choose a tag to compare
Pre-release
This patch was authored and released by @gwynne.
  • Allow AudienceClaim to represent more than one audience, per RFC 7519 § 4.1.3
  • Add verifyIntendedAudience(includes:) method for conveniently verifying that the audience is the intended one.
  • Add unit tests for new functionality.

Because the Value type of AudienceClaim is now [String] instead of String, this change is API-breaking!

This would normally require a semver-major update, but as the package is still in RC, I think it can scrape past with a semver-minor, especially since the change is to obey spec.

Added the nonce_supported claim to AppleIdentityToken

04 Mar 16:29
f1d0e51
Compare
Choose a tag to compare

The claim was missing.

This patch was authored and released by @grosch.

Release Candidate 1

28 Feb 23:30
d7a3a04
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release

Updates to Swift 5.2.

Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.

Fixes Codable support for LocaleClaim

26 Feb 21:13
57c49ff
Compare
Choose a tag to compare
Pre-release

Previously, LocaleClaims were not decoded from JWTs correctly. This patch fixes their behavior and adds tests to prevent regression.

Fix ECDSA signature size

21 Feb 18:37
77553e6
Compare
Choose a tag to compare
Pre-release

Correctly serializes ECDSA signature R / S values according to elliptic curve.

Before this patch, the code assumes R / S values will be 32 bytes. This is true for P-256 and P-384 keys, but is not true for P-521 keys. P-521 keys result in 66 byte R / S values.

From https://tools.ietf.org/html/rfc7515#appendix-A.3:

Section on ES256

We need to split the 64 member octet sequence of the JWS Signature

Section on ES512

We need to split the 132-member octet sequence of the JWS Signature into two 66-octet sequences

Note that the curve name (i.e., P-521) is different than the JWT algorithm name (i.e., ES512). The 512 in ES512 refers to SHA512. Also note that P-521 != 512, that's not a typo.

In order to support the different key curves dynamically, the signer now gets the curve name from the key during signing and verification. This curve is used to determine how wide the R / S values should be.