Releases: vapor/jwt
Releases · vapor/jwt
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.
JWT 2.2.0
JWT 2.1.1
JWT 2.1
New:
- X509 certificate support.
Fixed:
- Worked around Swift Foundation date bug.
- Playgrounds file works again.