Releases: vapor/jwt
5.0.0 Beta 3
5.0.0 Beta 2
What's Changed
- update CI by @JaapWijnen in #153
- Update to JWTKit Beta 2 by @ptoffy in #152
Full Changelog: 5.0.0-beta.1...5.0.0-beta.2
5.0.0 Beta 1
First beta release of major version 5.
Add missing platform specifiers
Add `@discardableResult` attribute to `verify(as:)` functions
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
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`
This patch was authored and released by @0xTim.
Adds async
APIs for JWT calls when interacting with JWKS servers
JWT 4.0.0
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
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
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
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
}