Skip to content

Releases: auth0/JWTDecode.swift

2.5.0

16 Oct 13:02
ee8c8ed
Compare
Choose a tag to compare

⚠️ This release adds support for Xcode 12 and drops support for Xcode < 11.4

Changed

2.4.1

13 Jan 17:47
7875753
Compare
Choose a tag to compare

Changed

  • Lowered tvOS deployment target to 9.0 #100 (Widcket)
  • Added SPM instructions to the README #99 (Widcket)

2.4.0

27 Nov 14:49
44895b4
Compare
Choose a tag to compare

Added

  • Added Swift Package Manager Support [SDK-1181] #97 (Widcket)
  • Added watchOS support #91 (jklp)

2.3.1

24 Sep 15:40
7db8df3
Compare
Choose a tag to compare

Added

  • Multiple Swift version support in CocoaPods #94 (ericbuehl)

2.3.0

17 Jul 10:58
Compare
Choose a tag to compare

Added

  • Added Swift 5 / Xcode 10.2 support #88 (cocojoe)

2.2.0

17 Dec 18:01
Compare
Choose a tag to compare

Added

Changed

2.1.1

03 Oct 09:54
Compare
Choose a tag to compare

Added

2.1.0

27 Sep 15:59
Compare
Choose a tag to compare

Added

2.0.0

14 Sep 22:28
16b20ee
Compare
Choose a tag to compare

Full Changelog

Support for Xcode 8 & Swift 3.

Following Swift API Guidelines, all functions and methods requires a parameter label.

So now to decode a token

try JWTDecode.decode(jwt: "token")

Also now JWTDecode errors conforms the protocol LocalizableError

public enum DecodeError: LocalizedError {
    case invalidBase64Url(String)
    case invalidJSON(String)
    case invalidPartCount(String, Int)

    public var localizedDescription: String {
        switch self {
        case .invalidJSON(let value):
            return NSLocalizedString("Malformed jwt token, failed to parse JSON value from base64Url \(value)", comment: "Invalid JSON value inside base64Url")
        case .invalidPartCount(let jwt, let parts):
            return NSLocalizedString("Malformed jwt token \(jwt) has \(parts) parts when it should have 3 parts", comment: "Invalid amount of jwt parts")
        case .invalidBase64Url(let value):
            return NSLocalizedString("Malformed jwt token, failed to decode base64Url value \(value)", comment: "Invalid JWT token base64Url value")
        }
    }
}

1.2.0

13 Sep 12:45
02d8a5c
Compare
Choose a tag to compare

Full Changelog

Support for Xcode 8 & Swift 2.3.