Skip to content

Releases: kylef/JSONWebToken.swift

2.2.0

20 Sep 00:35
Compare
Choose a tag to compare

2.2.0

Enhancements

  • On Apple platforms, JSONWebToken will use the system CommonCrypto where possible.
  • Allow passing additional headers when encoding a JWT.
  • Allow passing leeway parameter for date checks when verifying a JWT.

2.1.0

18 Jan 15:52
Compare
Choose a tag to compare

Enhancements

  • Introduces a new ClaimSet structure. The structure can be returned from
    decode providing you convenience accessors. encode will now accept a
    ClaimSet.

    ClaimSet provides methods to manually validate individual claims.

    try claims.validateAudience("example.com")
    try claims.validateIssuer("fuller.li")
    try claims.validateExpiary()
    try claims.validateNotBefore()
    try claims.validateIssuedAt()

2.0.2

02 Dec 19:34
Compare
Choose a tag to compare

Enhancements

  • Adds support for Linux.

2.0.1

13 Sep 10:32
Compare
Choose a tag to compare

This release adds support for Swift 3.0.

Breaking

  • Algorithms now take Data instead of a String. This improves the API
    allowing you to use keys that cannot be serialised as a String.

    You can easily convert a String to Data such as in the following example:

    .hs256("secret".data(using: .utf8)!)

2.0.0

13 Sep 10:06
Compare
Choose a tag to compare

This release adds support for Swift 3.0.

1.5.0

16 May 03:15
Compare
Choose a tag to compare

This release updates the dependency on CryptoSwift to ~> 0.4.0 which adds support for Swift 2.2.

1.4.3

29 Mar 15:54
Compare
Choose a tag to compare

Enhancements

  • Adds support for tvOS.
  • Adds support for Swift Package Manager.

1.4.0

18 Sep 19:02
Compare
Choose a tag to compare

Adds support for Swift 2.0.

1.2.0

05 Apr 23:37
Compare
Choose a tag to compare

Introduces a new builder pattern for creating payloads when creating a JWT.

JWT.encode(.HS256("secret")) { builder in
  builder.issuer = "fuller.li"
  builder.issuedAt = NSDate()
  builder["custom"] = "Hi"
}

1.1.0

05 Apr 23:39
Compare
Choose a tag to compare

Enforces that the decode function now takes an algorithm or a set of algorithms which the JWT must match while decoding a JWT (unless verification is disabled).

JWT.decode("eyJhb..hSeJy5w", .HS256("secret"))
JWT.decode("eyJh...5w", [.HS256("secret"), .HS256("secret2"), .HS512("secure")])