Releases: vapor/jwt
Releases · vapor/jwt
JWTKit 4.0.0 Alpha 1
More information on Vapor 4 alpha releases:
https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a
API Docs:
JWT 3.0.0
JWT 3.0 is here 🎉
🔏 JSON Web Token signing and verification (HMAC, RSA)
Docs:
https://docs.vapor.codes/3.0/jwt/getting-started/
API Docs:
https://api.vapor.codes/jwt/latest/JWT
JWT 3.0.0 RC 2.1.2
Fixed:
- Fixed a potential security issue that made JWT verification vulnerable to timing attacks. JWT verification will now always check all bytes, even if it has already detected a miss.
JWT 3.0.0 RC 2.1
Fixed:
- Updated to latest crypto digest methods.
API Docs:
https://api.vapor.codes/jwt/3.0.0-rc.2.1/JWT/
Milestone:
3.0.0-rc.2.1
JWT 3.0.0 RC 2
JWT 3.0.0 RC 1
New:
- Added RS256, RS384, and RS512 signature support
import Crypto
import JWT
// create public and private key (only public required for verification)
let privateKey: Data = ...
let publicKey: Data = ...
let privateSigner = JWTSigner.rs256(key: .private2048(privateKey))
let publicSigner = JWTSigner.rs256(key: .public2048(publicKey))
// serialize jwt (requires private key)
let payload: TestPayload = ...
var jwt = JWT(payload: payload)
_ = try jwt.sign(using: publicSigner) // throws, can't sign w/ public signer
let data = try jwt.sign(using: privateSigner)
// parse jwt (public and private key work)
let parsed = try JWT<TestPayload>(from: data, verifiedUsing: publicSigner)
let parsed2 = try JWT<TestPayload>(from: data, verifiedUsing: privateSigner) // also works
print(parsed.payload)
print(parsed2.payload)
JWT 3.0.0 Beta 1.1
3.0.0-beta.1.1 prerelease version deps
JWT 3.0.0 Beta 1
Merge pull request #82 from Cellane/patch-1 Updated dependencies
JWT 2.3.0
JWT 2.2.1
Fixed:
- Publicize required KeyIDHeader initializer.