Skip to content

Releases: vapor/jwt

Add `@discardableResult` attribute to `verify(as:)` functions

08 Jul 23:59
506d238
Compare
Choose a tag to compare
This patch was authored by @jiahan-wu and released by @0xTim.

Marks JWT's verify(as:) functions with @discardableResult so you can verify then without reading the contents in a clean way. For example

let _ = try req.jwt.verify(as: Payload.self)

Can become:

try req.jwt.verify(as: Payload.self)

Drop support for Swift 5.2 and 5.3

15 May 04:55
f9dc4cb
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version as
announced

Add support for `async`/`await`

26 Oct 16:27
f18aa4f
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

Adds async APIs for JWT calls when interacting with JWKS servers

JWT 4.0.0

30 Jul 21:34
46eddb5
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Docs:
https://docs.vapor.codes/4.0/jwt/

More information on Vapor 4 official release:
https://forums.swift.org/t/vapor-4-official-release-begins/34802

Make JWT helpers extendable

30 Jul 16:36
03cb638
Compare
Choose a tag to compare
Pre-release
This patch was authored and released by @tanner0101.

This change publicizes internal properties on JWT helpers to make them more easily extendable (#131, fixes #125).

// Custom extension
extension Request.JWT {
    // Methods now have access to the request
    func myVerifier() {
        print(self._request) // Current request
    }
}

// Usage
req.jwt.myVerifier()

The property names have been prefixed with _ to prevent autocomplete from suggesting things like:

req.jwt.request

⚠️ Note: Application.JWT and Request.JWT's initializers have been removed. These were redundant and can be declared much more concisely:

- Application.JWT(application: app)
+ app.jwt
- Request.JWT(request: req)
+ req.jwt

Add Microsoft JWT helpers

30 Jul 16:17
432a104
Compare
Choose a tag to compare
Pre-release
This patch was authored and released by @tanner0101.

Adds new helper methods for verifying Microsoft JWTs (#130, #121).

// Configure your Microsoft application identifier.
app.jwt.microsoft.applicationIdentifier = "..."

// Fetch and verify Microsoft identity token from Bearer header.
// Microsoft's JWKS is downloaded and cached automatically.
req.jwt.microsoft.verify().map { token in
    print(token) // MicrosoftIdentityToken
}

Added a public initializer to Request.JWT

24 May 23:05
245dc75
Compare
Choose a tag to compare
This patch was authored and released by @grosch.

People couldn't make their own verifiers since request was internal.

Update to Vapor 4 GM

09 Apr 17:58
8c1681e
Compare
Choose a tag to compare
Update to Vapor 4 GM Pre-release
Pre-release
This patch was authored by @gwynne and released by @tanner0101.

Updated for final Vapor 4.0.0 release, with (improved) tests passing (#119).

Updates audience claim check for apple/google

17 Mar 02:54
a37a151
Compare
Choose a tag to compare
This patch was authored by @grosch and released by @gwynne.

Updated based on the recent changes to JWT-Kit

Make HMAC signers thread safe

12 Mar 18:51
03c8c11
Compare
Choose a tag to compare

Makes HMAC JWT signers (hs256, hs384, hs512) thread safe (#117).