Skip to content

Releases: vapor/jwt

5.0.0 Beta 3

24 Apr 08:29
0b56253
Compare
Choose a tag to compare
5.0.0 Beta 3 Pre-release
Pre-release

What's Changed

Full Changelog: 5.0.0-beta.2...5.0.0-beta.3

5.0.0 Beta 2

17 Mar 15:37
690a134
Compare
Choose a tag to compare
5.0.0 Beta 2 Pre-release
Pre-release

What's Changed

Full Changelog: 5.0.0-beta.1...5.0.0-beta.2

5.0.0 Beta 1

27 Feb 11:57
c56703f
Compare
Choose a tag to compare
5.0.0 Beta 1 Pre-release
Pre-release

First beta release of major version 5.

Add missing platform specifiers

21 Mar 21:52
d65f32b
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

JWTKit and Vapor both already have the additional platforms.

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
}