Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Latest commit

 

History

History
240 lines (152 loc) · 9.92 KB

CHANGELOG.md

File metadata and controls

240 lines (152 loc) · 9.92 KB

Change Log

2.6.3 (2021-09-30)

Full Changelog

Changed

Fixed

  • Add supported Platforms to Package.swift #131 (obrhoff)

2.6.2 (2021-08-24)

Full Changelog

Security

2.6.1 (2021-06-07)

Full Changelog

Changed

  • Make test dependencies not resolve when installing with SPM [SDK-2599] #125 (Widcket)

2.6.0 (2021-02-02)

Full Changelog

2.5.0 (2020-10-16)

Full Changelog

Changed

2.4.1 (2020-01-11)

Full Changelog

Changed

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

2.4.0 (2019-11-27)

Full Changelog

Added

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

2.3.1 (2019-09-24)

Full Changelog

Added

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

2.3.0 (2019-05-06)

Full Changelog

Added

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

2.2.0 (2018-12-17)

Full Changelog

Added

Changed

2.1.1 (2017-10-03)

Full Changelog

Added

2.1.0 (2017-09-27)

Full Changelog

Added

2.0.0 (2016-09-14)

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 (2016-09-13)

Full Changelog

Support for Xcode 8 & Swift 2.3.

1.1.0 (2016-08-17)

Full Changelog

Changed:

  • Rework how claims are decoded #35 (hzalaz)
  • Add expired method to A0JWT #25 (wkoszek)
  • Require only App Extension Safe API (in iOS) #20 (hzalaz)

Added:

Deprecated:

To provide a better experience while dealing with claims and converting their values to Swift types, we deprecated the following method to retrive JWT claims

public func claim<T>(name: String) -> T?

In favor of the following method to retrieve the claim

let claim = jwt.claim(name: "claim_name")

and then you can try converting it's value to the proper type like

if let email = claim.string {
    print("JWT had email \(email)")
}

The supported conversions are:

var string: String?
var integer: Int?
var double: Double?
var date: NSDate?
var array: [String]?

1.0.0 (2015-09-16)

Full Changelog

Fixed bugs:

  • Can this target 8.0 instead of 8.3? #10

Merged pull requests:

0.3.2 (2015-08-21)

Full Changelog

0.3.1 (2015-07-25)

Full Changelog

Closed issues:

  • Failing to install via carthage #6

Merged pull requests:

  • Carthage with submodules #8 (hzalaz)

  • Build test only when running tests #7 (hzalaz)

0.3.0 (2015-06-26)

Full Changelog

Merged pull requests:

0.2.2 (2015-06-26)

Full Changelog

Closed issues:

  • Issue with time of expiration. #3

0.2.1 (2014-10-17)

Full Changelog

Closed issues:

  • Invalid id_token claims part. Failed to decode base64 #1

Merged pull requests:

0.2.0 (2014-10-03)

Full Changelog

0.1.0 (2014-10-01)

* This Change Log was automatically generated by github_changelog_generator