From e6973ed84f3442d246cd6ca0988342c2cf0b7fab Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 7 Feb 2018 21:21:56 +0000 Subject: [PATCH 1/4] feat: Extract algorithms to JWA --- JSONWebToken.podspec | 7 ++- Package.swift | 37 +++++++++------ Sources/JWA/HMAC/HMAC.swift | 36 ++++++++++++++ Sources/JWA/HMAC/HMACCommonCrypto.swift | 48 +++++++++++++++++++ Sources/JWA/HMAC/HMACCryptoSwift.swift | 32 +++++++++++++ Sources/JWA/JWA.swift | 32 +++++++++++++ Sources/JWA/None.swift | 15 ++++++ Sources/JWT/Algorithm.swift | 36 ++++++++++++++ Sources/JWT/Decode.swift | 2 +- Sources/JWT/Encode.swift | 3 +- Sources/JWT/HMAC.swift | 7 --- Sources/JWT/HMACCommonCrypto.swift | 46 ------------------ Sources/JWT/HMACCryptoSwift.swift | 28 ----------- Sources/JWT/JWA.swift | 57 ---------------------- Tests/JWATests/HMACTests.swift | 63 +++++++++++++++++++++++++ Tests/JWATests/NoneTests.swift | 23 +++++++++ 16 files changed, 316 insertions(+), 156 deletions(-) create mode 100644 Sources/JWA/HMAC/HMAC.swift create mode 100644 Sources/JWA/HMAC/HMACCommonCrypto.swift create mode 100644 Sources/JWA/HMAC/HMACCryptoSwift.swift create mode 100644 Sources/JWA/JWA.swift create mode 100644 Sources/JWA/None.swift create mode 100644 Sources/JWT/Algorithm.swift delete mode 100644 Sources/JWT/HMAC.swift delete mode 100644 Sources/JWT/HMACCommonCrypto.swift delete mode 100644 Sources/JWT/HMACCryptoSwift.swift delete mode 100644 Sources/JWT/JWA.swift create mode 100644 Tests/JWATests/HMACTests.swift create mode 100644 Tests/JWATests/NoneTests.swift diff --git a/JSONWebToken.podspec b/JSONWebToken.podspec index 3ce74ef..1d0094d 100644 --- a/JSONWebToken.podspec +++ b/JSONWebToken.podspec @@ -6,14 +6,17 @@ Pod::Spec.new do |spec| spec.license = { :type => 'BSD', :file => 'LICENSE' } spec.author = { 'Kyle Fuller' => 'kyle@fuller.li' } spec.source = { :git => 'https://github.com/kylef/JSONWebToken.swift.git', :tag => "#{spec.version}" } - spec.source_files = 'Sources/JWT/*.swift' + spec.source_files = [ + 'Sources/JWA/HMAC/*.swift', + 'Sources/{JWA,JWT}/*.swift', + ] spec.ios.deployment_target = '8.0' spec.osx.deployment_target = '10.9' spec.tvos.deployment_target = '9.0' spec.watchos.deployment_target = '2.0' spec.requires_arc = true spec.module_name = 'JWT' - spec.exclude_files = ['Sources/JWT/HMACCryptoSwift.swift'] + spec.exclude_files = ['Sources/JWA/HMAC/HMACCryptoSwift.swift'] if ARGV.include?('lint') spec.pod_target_xcconfig = { diff --git a/Package.swift b/Package.swift index 240d007..5ba29b4 100644 --- a/Package.swift +++ b/Package.swift @@ -1,24 +1,33 @@ +// swift-tools-version:4.0 + import PackageDescription #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -let package = Package( - name: "JWT", - dependencies: [ - .Package(url: "https://github.com/kylef-archive/CommonCrypto.git", majorVersion: 1), - ], - exclude: [ - "Sources/JWT/HMACCryptoSwift.swift", - ] -) +let dependencies = [ + Package.Dependency.package(url: "https://github.com/kylef-archive/CommonCrypto.git", from: "1.0.0"), +] +let excludes = ["HMAC/HMACCryptoSwift.swift"] +let targetDependencies: [Target.Dependency] = [] #else +let dependencies = [ + Package.Dependency.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "0.8.0"), +] +let excludes = ["HMAC/HMACCommonCrypto.swift"] +let targetDependencies: [Target.Dependency] = ["CryptoSwift"] +#endif + + let package = Package( name: "JWT", - dependencies: [ - .Package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", majorVersion: 0, minor: 8), + products: [ + .library(name: "JWT", targets: ["JWT"]), ], - exclude: [ - "Sources/JWT/HMACCommonCrypto.swift", + dependencies: dependencies, + targets: [ + .target(name: "JWA", dependencies: targetDependencies, exclude: excludes), + .target(name: "JWT", dependencies: ["JWA"]), + .testTarget(name: "JWATests", dependencies: ["JWA"]), + .testTarget(name: "JWTTests", dependencies: ["JWT"]), ] ) -#endif diff --git a/Sources/JWA/HMAC/HMAC.swift b/Sources/JWA/HMAC/HMAC.swift new file mode 100644 index 0000000..9252a03 --- /dev/null +++ b/Sources/JWA/HMAC/HMAC.swift @@ -0,0 +1,36 @@ +import Foundation + + +final public class HMACAlgorithm: Algorithm { + public let key: Data + public let hash: Hash + + public enum Hash { + case sha256 + case sha384 + case sha512 + } + + public init(key: Data, hash: Hash) { + self.key = key + self.hash = hash + } + + public init?(key: String, hash: Hash) { + guard let key = key.data(using: .utf8) else { return nil } + + self.key = key + self.hash = hash + } + + public var name: String { + switch hash { + case .sha256: + return "HS256" + case .sha384: + return "HS384" + case .sha512: + return "HS512" + } + } +} diff --git a/Sources/JWA/HMAC/HMACCommonCrypto.swift b/Sources/JWA/HMAC/HMACCommonCrypto.swift new file mode 100644 index 0000000..299fd8a --- /dev/null +++ b/Sources/JWA/HMAC/HMACCommonCrypto.swift @@ -0,0 +1,48 @@ +import Foundation +import CommonCrypto + + +extension HMACAlgorithm: SignAlgorithm, VerifyAlgorithm { + public func sign(_ message: Data) -> Data { + let context = UnsafeMutablePointer.allocate(capacity: 1) + defer { context.deallocate(capacity: 1) } + + key.withUnsafeBytes() { (buffer: UnsafePointer) in + CCHmacInit(context, hash.commonCryptoAlgorithm, buffer, size_t(key.count)) + } + + message.withUnsafeBytes { (buffer: UnsafePointer) in + CCHmacUpdate(context, buffer, size_t(message.count)) + } + + var hmac = Array(repeating: 0, count: Int(hash.commonCryptoDigestLength)) + CCHmacFinal(context, &hmac) + + return Data(hmac) + } +} + + +extension HMACAlgorithm.Hash { + var commonCryptoAlgorithm: CCHmacAlgorithm { + switch self { + case .sha256: + return CCHmacAlgorithm(kCCHmacAlgSHA256) + case .sha384: + return CCHmacAlgorithm(kCCHmacAlgSHA384) + case .sha512: + return CCHmacAlgorithm(kCCHmacAlgSHA512) + } + } + + var commonCryptoDigestLength: Int32 { + switch self { + case .sha256: + return CC_SHA256_DIGEST_LENGTH + case .sha384: + return CC_SHA384_DIGEST_LENGTH + case .sha512: + return CC_SHA512_DIGEST_LENGTH + } + } +} diff --git a/Sources/JWA/HMAC/HMACCryptoSwift.swift b/Sources/JWA/HMAC/HMACCryptoSwift.swift new file mode 100644 index 0000000..6153049 --- /dev/null +++ b/Sources/JWA/HMAC/HMACCryptoSwift.swift @@ -0,0 +1,32 @@ +import Foundation +import CryptoSwift + + +extension HMACAlgorithm: SignAlgorithm, VerifyAlgorithm { + public func sign(_ message: Data) -> Data { + let mac = HMAC(key: key.bytes, variant: hash.cryptoSwiftVariant) + + let result: [UInt8] + do { + result = try mac.authenticate(message.bytes) + } catch { + result = [] + } + + return Data(bytes: result) + } +} + + +extension HMACAlgorithm.Hash { + var cryptoSwiftVariant: HMAC.Variant { + switch self { + case .sha256: + return .sha256 + case .sha384: + return .sha384 + case .sha512: + return .sha512 + } + } +} diff --git a/Sources/JWA/JWA.swift b/Sources/JWA/JWA.swift new file mode 100644 index 0000000..2e02f7d --- /dev/null +++ b/Sources/JWA/JWA.swift @@ -0,0 +1,32 @@ +import Foundation + + +/// Represents a JSON Web Algorithm (JWA) +/// https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 +public protocol Algorithm: class { + var name: String { get } +} + + +// MARK: Signing + +/// Represents a JSON Web Algorithm (JWA) that is capable of signing +public protocol SignAlgorithm: Algorithm { + func sign(_ message: Data) -> Data +} + + +// MARK: Verifying + +/// Represents a JSON Web Algorithm (JWA) that is capable of verifying +public protocol VerifyAlgorithm: Algorithm { + func verify(_ message: Data, signature: Data) -> Bool +} + + +extension SignAlgorithm { + /// Verify a signature for a message using the algorithm + public func verify(_ message: Data, signature: Data) -> Bool { + return sign(message) == signature + } +} diff --git a/Sources/JWA/None.swift b/Sources/JWA/None.swift new file mode 100644 index 0000000..26a238d --- /dev/null +++ b/Sources/JWA/None.swift @@ -0,0 +1,15 @@ +import Foundation + + +/// No Algorithm, i-e, insecure +public final class NoneAlgorithm: Algorithm, SignAlgorithm, VerifyAlgorithm { + public var name: String { + return "none" + } + + public init() {} + + public func sign(_ message: Data) -> Data { + return Data() + } +} diff --git a/Sources/JWT/Algorithm.swift b/Sources/JWT/Algorithm.swift new file mode 100644 index 0000000..f1d1e91 --- /dev/null +++ b/Sources/JWT/Algorithm.swift @@ -0,0 +1,36 @@ +import Foundation +import JWA + + +/// Represents a JSON Web Algorithm (JWA) +/// https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 +public enum Algorithm: CustomStringConvertible { + /// No Algorithm, i-e, insecure + case none + + /// HMAC using SHA-256 hash algorithm + case hs256(Data) + + /// HMAC using SHA-384 hash algorithm + case hs384(Data) + + /// HMAC using SHA-512 hash algorithm + case hs512(Data) + + var algorithm: SignAlgorithm { + switch self { + case .none: + return NoneAlgorithm() + case .hs256(let key): + return HMACAlgorithm(key: key, hash: .sha256) + case .hs384(let key): + return HMACAlgorithm(key: key, hash: .sha384) + case .hs512(let key): + return HMACAlgorithm(key: key, hash: .sha512) + } + } + + public var description: String { + return algorithm.name + } +} diff --git a/Sources/JWT/Decode.swift b/Sources/JWT/Decode.swift index 5bfa569..0e2b6d0 100644 --- a/Sources/JWT/Decode.swift +++ b/Sources/JWT/Decode.swift @@ -108,7 +108,7 @@ func verifySignature(_ algorithms: [Algorithm], header: JOSEHeader, signingInput let verifiedAlgorithms = algorithms .filter { algorithm in algorithm.description == alg } - .filter { algorithm in algorithm.verify(signingInput, signature: signature) } + .filter { algorithm in algorithm.algorithm.verify(signingInput.data(using: .utf8)!, signature: signature) } if verifiedAlgorithms.isEmpty { throw InvalidToken.invalidAlgorithm diff --git a/Sources/JWT/Encode.swift b/Sources/JWT/Encode.swift index 0aaf196..643c827 100644 --- a/Sources/JWT/Encode.swift +++ b/Sources/JWT/Encode.swift @@ -1,5 +1,6 @@ import Foundation + /*** Encode a set of claims - parameter claims: The set of claims - parameter algorithm: The algorithm to sign the payload with @@ -17,7 +18,7 @@ public func encode(claims: ClaimSet, algorithm: Algorithm, headers: [String: Str let header = try! encoder.encodeString(headers) let payload = encoder.encodeString(claims.claims)! let signingInput = "\(header).\(payload)" - let signature = algorithm.sign(signingInput) + let signature = base64encode(algorithm.algorithm.sign(signingInput.data(using: .utf8)!)) return "\(signingInput).\(signature)" } diff --git a/Sources/JWT/HMAC.swift b/Sources/JWT/HMAC.swift deleted file mode 100644 index 2e9c66a..0000000 --- a/Sources/JWT/HMAC.swift +++ /dev/null @@ -1,7 +0,0 @@ -import Foundation - -enum HMACAlgorithm { - case sha256 - case sha384 - case sha512 -} diff --git a/Sources/JWT/HMACCommonCrypto.swift b/Sources/JWT/HMACCommonCrypto.swift deleted file mode 100644 index a144ccb..0000000 --- a/Sources/JWT/HMACCommonCrypto.swift +++ /dev/null @@ -1,46 +0,0 @@ -import Foundation -import CommonCrypto - - -extension HMACAlgorithm { - var commonCryptoAlgorithm: CCHmacAlgorithm { - switch self { - case .sha256: - return CCHmacAlgorithm(kCCHmacAlgSHA256) - case .sha384: - return CCHmacAlgorithm(kCCHmacAlgSHA384) - case .sha512: - return CCHmacAlgorithm(kCCHmacAlgSHA512) - } - } - - var commonCryptoDigestLength: Int32 { - switch self { - case .sha256: - return CC_SHA256_DIGEST_LENGTH - case .sha384: - return CC_SHA384_DIGEST_LENGTH - case .sha512: - return CC_SHA512_DIGEST_LENGTH - } - } -} - - -func hmac(algorithm: HMACAlgorithm, key: Data, message: Data) -> Data { - let context = UnsafeMutablePointer.allocate(capacity: 1) - defer { context.deallocate(capacity: 1) } - - key.withUnsafeBytes() { (buffer: UnsafePointer) in - CCHmacInit(context, algorithm.commonCryptoAlgorithm, buffer, size_t(key.count)) - } - - message.withUnsafeBytes { (buffer: UnsafePointer) in - CCHmacUpdate(context, buffer, size_t(message.count)) - } - - var hmac = Array(repeating: 0, count: Int(algorithm.commonCryptoDigestLength)) - CCHmacFinal(context, &hmac) - - return Data(hmac) -} diff --git a/Sources/JWT/HMACCryptoSwift.swift b/Sources/JWT/HMACCryptoSwift.swift deleted file mode 100644 index 401a803..0000000 --- a/Sources/JWT/HMACCryptoSwift.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation -import CryptoSwift - - -extension HMACAlgorithm { - var cryptoSwiftVariant: HMAC.Variant { - switch self { - case .sha256: - return .sha256 - case .sha384: - return .sha384 - case .sha512: - return .sha512 - } - } -} - - -func hmac(algorithm: HMACAlgorithm, key: Data, message: Data) -> Data { - let mac = HMAC(key: key.bytes, variant: algorithm.cryptoSwiftVariant) - let result: [UInt8] - do { - result = try mac.authenticate(message.bytes) - } catch { - result = [] - } - return Data(bytes: result) -} diff --git a/Sources/JWT/JWA.swift b/Sources/JWT/JWA.swift deleted file mode 100644 index 3ac9cef..0000000 --- a/Sources/JWT/JWA.swift +++ /dev/null @@ -1,57 +0,0 @@ -import Foundation - -/// Represents a JSON Web Algorithm (JWA) -/// https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 -public enum Algorithm: CustomStringConvertible { - /// No Algorithm, i-e, insecure - case none - - /// HMAC using SHA-256 hash algorithm - case hs256(Data) - - /// HMAC using SHA-384 hash algorithm - case hs384(Data) - - /// HMAC using SHA-512 hash algorithm - case hs512(Data) - - public var description: String { - switch self { - case .none: - return "none" - case .hs256: - return "HS256" - case .hs384: - return "HS384" - case .hs512: - return "HS512" - } - } - - /// Sign a message using the algorithm - func sign(_ message: String) -> String { - func signHS(_ key: Data, algorithm: HMACAlgorithm) -> String { - let messageData = message.data(using: String.Encoding.utf8, allowLossyConversion: false)! - return base64encode(hmac(algorithm: algorithm, key: key, message: messageData)) - } - - switch self { - case .none: - return "" - - case .hs256(let key): - return signHS(key, algorithm: .sha256) - - case .hs384(let key): - return signHS(key, algorithm: .sha384) - - case .hs512(let key): - return signHS(key, algorithm: .sha512) - } - } - - /// Verify a signature for a message using the algorithm - func verify(_ message: String, signature: Data) -> Bool { - return sign(message) == base64encode(signature) - } -} diff --git a/Tests/JWATests/HMACTests.swift b/Tests/JWATests/HMACTests.swift new file mode 100644 index 0000000..2991630 --- /dev/null +++ b/Tests/JWATests/HMACTests.swift @@ -0,0 +1,63 @@ +import Foundation +import XCTest +import JWA + + +class HMACAlgorithmTests: XCTestCase { + let key = "secret".data(using: .utf8)! + let message = "message".data(using: .utf8)! + let sha256Signature = Data(base64Encoded: "i19IcCmVwVmMVz2x4hhmqbgl1KeU0WnXBgoDYFeWNgs=")! + let sha384Signature = Data(base64Encoded: "rQ706A2kJ7KjPURXyXK/dZ9Qdm+7ZlaQ1Qt8s43VIX21Wck+p8vuSOKuGltKr9NL")! + let sha512Signature = Data(base64Encoded: "G7pYfHMO7box9Tq7C2ylieCd5OiU7kVeYUCAc5l1mtqvoGnux8AWR7sXPcsX9V0ir0mhgHG3SMXC7df3qCnGMg==")! + + // MARK: Name + + func testSHA256Name() { + let algorithm = HMACAlgorithm(key: key, hash: .sha256) + XCTAssertEqual(algorithm.name, "HS256") + } + + func testSHA384Name() { + let algorithm = HMACAlgorithm(key: key, hash: .sha384) + XCTAssertEqual(algorithm.name, "HS384") + } + + func testSHA512Name() { + let algorithm = HMACAlgorithm(key: key, hash: .sha512) + XCTAssertEqual(algorithm.name, "HS512") + } + + // MARK: Signing + + func testSHA256Sign() { + let algorithm = HMACAlgorithm(key: key, hash: .sha256) + XCTAssertEqual(algorithm.sign(message), sha256Signature) + } + + func testSHA384Sign() { + let algorithm = HMACAlgorithm(key: key, hash: .sha384) + XCTAssertEqual(algorithm.sign(message), sha384Signature) + } + + func testSHA512Sign() { + let algorithm = HMACAlgorithm(key: key, hash: .sha512) + XCTAssertEqual(algorithm.sign(message), sha512Signature) + } + + // MARK: Verify + + func testSHA256Verify() { + let algorithm = HMACAlgorithm(key: key, hash: .sha256) + XCTAssertTrue(algorithm.verify(message, signature: sha256Signature)) + } + + func testSHA384Verify() { + let algorithm = HMACAlgorithm(key: key, hash: .sha384) + XCTAssertTrue(algorithm.verify(message, signature: sha384Signature)) + } + + func testSHA512Verify() { + let algorithm = HMACAlgorithm(key: key, hash: .sha512) + XCTAssertTrue(algorithm.verify(message, signature: sha512Signature)) + } +} diff --git a/Tests/JWATests/NoneTests.swift b/Tests/JWATests/NoneTests.swift new file mode 100644 index 0000000..c3987c5 --- /dev/null +++ b/Tests/JWATests/NoneTests.swift @@ -0,0 +1,23 @@ +import XCTest +import JWA + + +class NoneAlgorithmTests: XCTestCase { + let message = "message".data(using: .utf8)! + let signature = Data() + + func testName() { + let algorithm = NoneAlgorithm() + XCTAssertEqual(algorithm.name, "none") + } + + func testSign() { + let algorithm = NoneAlgorithm() + XCTAssertEqual(algorithm.sign(message), signature) + } + + func testVerify() { + let algorithm = NoneAlgorithm() + XCTAssertTrue(algorithm.verify(message, signature: signature)) + } +} From 19dd92c14efec3261af3b72228809eeb93df81de Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 7 Feb 2018 21:49:21 +0000 Subject: [PATCH 2/4] chore: Remove Xcode Project for now Not possible to keep this in-sync during development, maybe restored in future --- .travis.yml | 10 +- JSONWebToken.podspec | 32 - JWT.xcodeproj/project.pbxproj | 921 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/JWT-OSX.xcscheme | 115 --- .../xcshareddata/xcschemes/JWT-iOS.xcscheme | 82 -- .../xcshareddata/xcschemes/JWT-tvOS.xcscheme | 82 -- .../xcschemes/JWT-watchOS.xcscheme | 82 -- JWT/Info.plist | 28 - JWT/JWT.h | 17 - 10 files changed, 5 insertions(+), 1371 deletions(-) delete mode 100644 JSONWebToken.podspec delete mode 100644 JWT.xcodeproj/project.pbxproj delete mode 100644 JWT.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 JWT.xcodeproj/xcshareddata/xcschemes/JWT-OSX.xcscheme delete mode 100644 JWT.xcodeproj/xcshareddata/xcschemes/JWT-iOS.xcscheme delete mode 100644 JWT.xcodeproj/xcshareddata/xcschemes/JWT-tvOS.xcscheme delete mode 100644 JWT.xcodeproj/xcshareddata/xcschemes/JWT-watchOS.xcscheme delete mode 100644 JWT/Info.plist delete mode 100644 JWT/JWT.h diff --git a/.travis.yml b/.travis.yml index 20995c2..cbcea7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ install: - git submodule update --init --recursive script: - swift test -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-OSX test -sdk macosx; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-iOS build -sdk iphonesimulator; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-tvOS build -sdk appletvsimulator; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-watchOS build -sdk watchsimulator; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod lib lint --allow-warnings; fi +#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-OSX test -sdk macosx; fi +#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-iOS build -sdk iphonesimulator; fi +#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-tvOS build -sdk appletvsimulator; fi +#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-watchOS build -sdk watchsimulator; fi +#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod lib lint --allow-warnings; fi diff --git a/JSONWebToken.podspec b/JSONWebToken.podspec deleted file mode 100644 index 1d0094d..0000000 --- a/JSONWebToken.podspec +++ /dev/null @@ -1,32 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'JSONWebToken' - spec.version = '2.2.0' - spec.summary = 'Swift library for JSON Web Tokens (JWT).' - spec.homepage = 'https://github.com/kylef/JSONWebToken.swift' - spec.license = { :type => 'BSD', :file => 'LICENSE' } - spec.author = { 'Kyle Fuller' => 'kyle@fuller.li' } - spec.source = { :git => 'https://github.com/kylef/JSONWebToken.swift.git', :tag => "#{spec.version}" } - spec.source_files = [ - 'Sources/JWA/HMAC/*.swift', - 'Sources/{JWA,JWT}/*.swift', - ] - spec.ios.deployment_target = '8.0' - spec.osx.deployment_target = '10.9' - spec.tvos.deployment_target = '9.0' - spec.watchos.deployment_target = '2.0' - spec.requires_arc = true - spec.module_name = 'JWT' - spec.exclude_files = ['Sources/JWA/HMAC/HMACCryptoSwift.swift'] - - if ARGV.include?('lint') - spec.pod_target_xcconfig = { - 'SWIFT_INCLUDE_PATHS' => Dir.pwd, - } - else - spec.pod_target_xcconfig = { - 'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/JSONWebToken/', - } - end - - spec.preserve_paths = 'CommonCrypto/{shim.h,module.modulemap}' -end diff --git a/JWT.xcodeproj/project.pbxproj b/JWT.xcodeproj/project.pbxproj deleted file mode 100644 index 6c895b0..0000000 --- a/JWT.xcodeproj/project.pbxproj +++ /dev/null @@ -1,921 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 271E10801F90253300B5033C /* JWA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E107F1F90253300B5033C /* JWA.swift */; }; - 271E10811F90253300B5033C /* JWA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E107F1F90253300B5033C /* JWA.swift */; }; - 271E10821F90253300B5033C /* JWA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E107F1F90253300B5033C /* JWA.swift */; }; - 271E10831F90253300B5033C /* JWA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E107F1F90253300B5033C /* JWA.swift */; }; - 271E10891F90334B00B5033C /* CompactJSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */; }; - 271E108B1F9034B100B5033C /* CompactJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */; }; - 271E108D1F9041C400B5033C /* CompactJSONDecoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108C1F9041C400B5033C /* CompactJSONDecoderTests.swift */; }; - 271E108F1F9042E900B5033C /* CompactJSONEncoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108E1F9042E900B5033C /* CompactJSONEncoderTests.swift */; }; - 271E10911F90488700B5033C /* JWTEncodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10901F90488700B5033C /* JWTEncodeTests.swift */; }; - 271E10931F9049A400B5033C /* PayloadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10921F9049A400B5033C /* PayloadTests.swift */; }; - 271E10951F9049E200B5033C /* ClaimSetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10941F9049E200B5033C /* ClaimSetTests.swift */; }; - 271E10971F904A0700B5033C /* IntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10961F904A0700B5033C /* IntegrationTests.swift */; }; - 273010FF1F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; - 273011001F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; - 273011011F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; - 273011021F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; - 273011161F34029900219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; - 273011171F34029900219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; - 273011181F34029A00219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; - 273011191F34029A00219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; - 277794051DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; - 277794061DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; - 277794071DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; - 277794081DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; - 2777940B1DF22BE400573F3E /* JOSEHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940A1DF22BE400573F3E /* JOSEHeader.swift */; }; - 2777940C1DF22BE400573F3E /* JOSEHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940A1DF22BE400573F3E /* JOSEHeader.swift */; }; - 2777940D1DF22BE400573F3E /* JOSEHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940A1DF22BE400573F3E /* JOSEHeader.swift */; }; - 2777940E1DF22BE400573F3E /* JOSEHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940A1DF22BE400573F3E /* JOSEHeader.swift */; }; - 277794101DF22D0D00573F3E /* Encode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940F1DF22D0D00573F3E /* Encode.swift */; }; - 277794111DF22D0D00573F3E /* Encode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940F1DF22D0D00573F3E /* Encode.swift */; }; - 277794121DF22D0D00573F3E /* Encode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940F1DF22D0D00573F3E /* Encode.swift */; }; - 277794131DF22D0D00573F3E /* Encode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2777940F1DF22D0D00573F3E /* Encode.swift */; }; - 279D63A21AD07FFF0024E2BC /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 279D63A81AD07FFF0024E2BC /* JWT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 279D639C1AD07FFF0024E2BC /* JWT.framework */; }; - 279D63AF1AD07FFF0024E2BC /* JWTDecodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63AE1AD07FFF0024E2BC /* JWTDecodeTests.swift */; }; - 501BF92F1FAB05AE00449B76 /* CompactJSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */; }; - 501BF9301FAB05C500449B76 /* CompactJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */; }; - 501BF9311FAB05E400449B76 /* CompactJSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */; }; - 501BF9321FAB05E400449B76 /* CompactJSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */; }; - 501BF9331FAB05E700449B76 /* CompactJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */; }; - 501BF9341FAB05E700449B76 /* CompactJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */; }; - 520A71171C469F010005C709 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; }; - 520A71181C469F010005C709 /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71141C469F010005C709 /* Claims.swift */; }; - 520A71191C469F010005C709 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; }; - 520A711A1C469F010005C709 /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71161C469F010005C709 /* JWT.swift */; }; - CD9B62171C7753D8005D4844 /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71141C469F010005C709 /* Claims.swift */; }; - CD9B62181C7753D8005D4844 /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71161C469F010005C709 /* JWT.swift */; }; - CD9B62191C7753D8005D4844 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; }; - CD9B621A1C7753D8005D4844 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; }; - CD9B621E1C7753D8005D4844 /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD9B62291C7753EC005D4844 /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71141C469F010005C709 /* Claims.swift */; }; - CD9B622A1C7753EC005D4844 /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71161C469F010005C709 /* JWT.swift */; }; - CD9B622B1C7753EC005D4844 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; }; - CD9B622C1C7753EC005D4844 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; }; - CD9B62301C7753EC005D4844 /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD9B623B1C7753FB005D4844 /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71141C469F010005C709 /* Claims.swift */; }; - CD9B623C1C7753FB005D4844 /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71161C469F010005C709 /* JWT.swift */; }; - CD9B623D1C7753FB005D4844 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; }; - CD9B623E1C7753FB005D4844 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; }; - CD9B62421C7753FB005D4844 /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 279D63A91AD07FFF0024E2BC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 279D63931AD07FFF0024E2BC /* Project object */; - proxyType = 1; - remoteGlobalIDString = 279D639B1AD07FFF0024E2BC; - remoteInfo = JWT; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 271E107F1F90253300B5033C /* JWA.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWA.swift; sourceTree = ""; }; - 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactJSONEncoder.swift; sourceTree = ""; }; - 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactJSONDecoder.swift; sourceTree = ""; }; - 271E108C1F9041C400B5033C /* CompactJSONDecoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactJSONDecoderTests.swift; sourceTree = ""; }; - 271E108E1F9042E900B5033C /* CompactJSONEncoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactJSONEncoderTests.swift; sourceTree = ""; }; - 271E10901F90488700B5033C /* JWTEncodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWTEncodeTests.swift; sourceTree = ""; }; - 271E10921F9049A400B5033C /* PayloadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayloadTests.swift; sourceTree = ""; }; - 271E10941F9049E200B5033C /* ClaimSetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClaimSetTests.swift; sourceTree = ""; }; - 271E10961F904A0700B5033C /* IntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntegrationTests.swift; sourceTree = ""; }; - 273010FE1F33EABA00219C35 /* HMAC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMAC.swift; sourceTree = ""; }; - 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMACCommonCrypto.swift; sourceTree = ""; }; - 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMACCryptoSwift.swift; sourceTree = ""; }; - 277794041DF221F800573F3E /* ClaimSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClaimSet.swift; sourceTree = ""; }; - 2777940A1DF22BE400573F3E /* JOSEHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JOSEHeader.swift; sourceTree = ""; }; - 2777940F1DF22D0D00573F3E /* Encode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Encode.swift; sourceTree = ""; }; - 279D639C1AD07FFF0024E2BC /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 279D63A01AD07FFF0024E2BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 279D63A11AD07FFF0024E2BC /* JWT.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JWT.h; sourceTree = ""; }; - 279D63A71AD07FFF0024E2BC /* JWTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JWTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 279D63AD1AD07FFF0024E2BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 279D63AE1AD07FFF0024E2BC /* JWTDecodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWTDecodeTests.swift; sourceTree = ""; }; - 520A71131C469F010005C709 /* Base64.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Base64.swift; sourceTree = ""; }; - 520A71141C469F010005C709 /* Claims.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Claims.swift; sourceTree = ""; }; - 520A71151C469F010005C709 /* Decode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Decode.swift; sourceTree = ""; }; - 520A71161C469F010005C709 /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = ""; }; - 520A711B1C469F440005C709 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - 540942F3614C41E3827F2013 /* Pods_JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CD9B62231C7753D8005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CD9B62351C7753EC005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CD9B62471C7753FB005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CE8198B6E30BA6B8F8125FA7 /* Pods_JWTTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JWTTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 279D63981AD07FFF0024E2BC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 279D63A41AD07FFF0024E2BC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 279D63A81AD07FFF0024E2BC /* JWT.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B621B1C7753D8005D4844 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B622D1C7753EC005D4844 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B623F1C7753FB005D4844 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 271E10861F902D8900B5033C /* JWT */ = { - isa = PBXGroup; - children = ( - 277794041DF221F800573F3E /* ClaimSet.swift */, - 2777940A1DF22BE400573F3E /* JOSEHeader.swift */, - 271E10881F90334B00B5033C /* CompactJSONEncoder.swift */, - 271E108A1F9034B100B5033C /* CompactJSONDecoder.swift */, - 520A71131C469F010005C709 /* Base64.swift */, - 520A71141C469F010005C709 /* Claims.swift */, - 520A71151C469F010005C709 /* Decode.swift */, - 2777940F1DF22D0D00573F3E /* Encode.swift */, - 520A71161C469F010005C709 /* JWT.swift */, - 271E107F1F90253300B5033C /* JWA.swift */, - 273010FE1F33EABA00219C35 /* HMAC.swift */, - 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */, - 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */, - ); - path = JWT; - sourceTree = ""; - }; - 279D63921AD07FFF0024E2BC = { - isa = PBXGroup; - children = ( - 520A711B1C469F440005C709 /* Package.swift */, - 520A71121C469F010005C709 /* Sources */, - 279D639E1AD07FFF0024E2BC /* Sources */, - 279D63AB1AD07FFF0024E2BC /* Tests */, - 279D639D1AD07FFF0024E2BC /* Products */, - AC8AE547FDAF3DD80EB4DB2F /* Frameworks */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 279D639D1AD07FFF0024E2BC /* Products */ = { - isa = PBXGroup; - children = ( - 279D639C1AD07FFF0024E2BC /* JWT.framework */, - 279D63A71AD07FFF0024E2BC /* JWTTests.xctest */, - CD9B62231C7753D8005D4844 /* JWT.framework */, - CD9B62351C7753EC005D4844 /* JWT.framework */, - CD9B62471C7753FB005D4844 /* JWT.framework */, - ); - name = Products; - sourceTree = ""; - }; - 279D639E1AD07FFF0024E2BC /* Sources */ = { - isa = PBXGroup; - children = ( - 279D63A11AD07FFF0024E2BC /* JWT.h */, - 279D639F1AD07FFF0024E2BC /* Supporting Files */, - ); - name = Sources; - path = JWT; - sourceTree = ""; - }; - 279D639F1AD07FFF0024E2BC /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 279D63A01AD07FFF0024E2BC /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 279D63AB1AD07FFF0024E2BC /* Tests */ = { - isa = PBXGroup; - children = ( - 271E108C1F9041C400B5033C /* CompactJSONDecoderTests.swift */, - 271E108E1F9042E900B5033C /* CompactJSONEncoderTests.swift */, - 271E10941F9049E200B5033C /* ClaimSetTests.swift */, - 271E10921F9049A400B5033C /* PayloadTests.swift */, - 271E10901F90488700B5033C /* JWTEncodeTests.swift */, - 279D63AE1AD07FFF0024E2BC /* JWTDecodeTests.swift */, - 271E10961F904A0700B5033C /* IntegrationTests.swift */, - 279D63AC1AD07FFF0024E2BC /* Supporting Files */, - ); - name = Tests; - path = Tests/JWTTests; - sourceTree = ""; - }; - 279D63AC1AD07FFF0024E2BC /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 279D63AD1AD07FFF0024E2BC /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 520A71121C469F010005C709 /* Sources */ = { - isa = PBXGroup; - children = ( - 271E10861F902D8900B5033C /* JWT */, - ); - path = Sources; - sourceTree = ""; - }; - AC8AE547FDAF3DD80EB4DB2F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 540942F3614C41E3827F2013 /* Pods_JWT.framework */, - CE8198B6E30BA6B8F8125FA7 /* Pods_JWTTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 279D63991AD07FFF0024E2BC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 279D63A21AD07FFF0024E2BC /* JWT.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B621D1C7753D8005D4844 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CD9B621E1C7753D8005D4844 /* JWT.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B622F1C7753EC005D4844 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CD9B62301C7753EC005D4844 /* JWT.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B62411C7753FB005D4844 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CD9B62421C7753FB005D4844 /* JWT.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 279D639B1AD07FFF0024E2BC /* JWT-OSX */ = { - isa = PBXNativeTarget; - buildConfigurationList = 279D63B21AD07FFF0024E2BC /* Build configuration list for PBXNativeTarget "JWT-OSX" */; - buildPhases = ( - 279D63971AD07FFF0024E2BC /* Sources */, - 279D63981AD07FFF0024E2BC /* Frameworks */, - 279D63991AD07FFF0024E2BC /* Headers */, - 66725DA11C591D9800FC32F4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "JWT-OSX"; - productName = JWT; - productReference = 279D639C1AD07FFF0024E2BC /* JWT.framework */; - productType = "com.apple.product-type.framework"; - }; - 279D63A61AD07FFF0024E2BC /* JWTTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 279D63B51AD07FFF0024E2BC /* Build configuration list for PBXNativeTarget "JWTTests" */; - buildPhases = ( - 279D63A31AD07FFF0024E2BC /* Sources */, - 279D63A41AD07FFF0024E2BC /* Frameworks */, - 279D63A51AD07FFF0024E2BC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 279D63AA1AD07FFF0024E2BC /* PBXTargetDependency */, - ); - name = JWTTests; - productName = JWTTests; - productReference = 279D63A71AD07FFF0024E2BC /* JWTTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - CD9B62131C7753D8005D4844 /* JWT-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = CD9B62201C7753D8005D4844 /* Build configuration list for PBXNativeTarget "JWT-iOS" */; - buildPhases = ( - CD9B62161C7753D8005D4844 /* Sources */, - CD9B621B1C7753D8005D4844 /* Frameworks */, - CD9B621D1C7753D8005D4844 /* Headers */, - CD9B621F1C7753D8005D4844 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "JWT-iOS"; - productName = JWT; - productReference = CD9B62231C7753D8005D4844 /* JWT.framework */; - productType = "com.apple.product-type.framework"; - }; - CD9B62251C7753EC005D4844 /* JWT-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = CD9B62321C7753EC005D4844 /* Build configuration list for PBXNativeTarget "JWT-tvOS" */; - buildPhases = ( - CD9B62281C7753EC005D4844 /* Sources */, - CD9B622D1C7753EC005D4844 /* Frameworks */, - CD9B622F1C7753EC005D4844 /* Headers */, - CD9B62311C7753EC005D4844 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "JWT-tvOS"; - productName = JWT; - productReference = CD9B62351C7753EC005D4844 /* JWT.framework */; - productType = "com.apple.product-type.framework"; - }; - CD9B62371C7753FB005D4844 /* JWT-watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = CD9B62441C7753FB005D4844 /* Build configuration list for PBXNativeTarget "JWT-watchOS" */; - buildPhases = ( - CD9B623A1C7753FB005D4844 /* Sources */, - CD9B623F1C7753FB005D4844 /* Frameworks */, - CD9B62411C7753FB005D4844 /* Headers */, - CD9B62431C7753FB005D4844 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "JWT-watchOS"; - productName = JWT; - productReference = CD9B62471C7753FB005D4844 /* JWT.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 279D63931AD07FFF0024E2BC /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftMigration = 0700; - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0910; - ORGANIZATIONNAME = Cocode; - TargetAttributes = { - 279D639B1AD07FFF0024E2BC = { - CreatedOnToolsVersion = 6.2; - }; - 279D63A61AD07FFF0024E2BC = { - CreatedOnToolsVersion = 6.2; - }; - }; - }; - buildConfigurationList = 279D63961AD07FFF0024E2BC /* Build configuration list for PBXProject "JWT" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 279D63921AD07FFF0024E2BC; - productRefGroup = 279D639D1AD07FFF0024E2BC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 279D639B1AD07FFF0024E2BC /* JWT-OSX */, - CD9B62131C7753D8005D4844 /* JWT-iOS */, - CD9B62251C7753EC005D4844 /* JWT-tvOS */, - CD9B62371C7753FB005D4844 /* JWT-watchOS */, - 279D63A61AD07FFF0024E2BC /* JWTTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 279D63A51AD07FFF0024E2BC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 66725DA11C591D9800FC32F4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B621F1C7753D8005D4844 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B62311C7753EC005D4844 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B62431C7753FB005D4844 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 279D63971AD07FFF0024E2BC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 271E10801F90253300B5033C /* JWA.swift in Sources */, - 273011161F34029900219C35 /* HMACCommonCrypto.swift in Sources */, - 520A71181C469F010005C709 /* Claims.swift in Sources */, - 271E10891F90334B00B5033C /* CompactJSONEncoder.swift in Sources */, - 520A711A1C469F010005C709 /* JWT.swift in Sources */, - 520A71191C469F010005C709 /* Decode.swift in Sources */, - 277794101DF22D0D00573F3E /* Encode.swift in Sources */, - 2777940B1DF22BE400573F3E /* JOSEHeader.swift in Sources */, - 277794051DF221F800573F3E /* ClaimSet.swift in Sources */, - 273010FF1F33EABA00219C35 /* HMAC.swift in Sources */, - 271E108B1F9034B100B5033C /* CompactJSONDecoder.swift in Sources */, - 520A71171C469F010005C709 /* Base64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 279D63A31AD07FFF0024E2BC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 271E10971F904A0700B5033C /* IntegrationTests.swift in Sources */, - 271E108F1F9042E900B5033C /* CompactJSONEncoderTests.swift in Sources */, - 271E10911F90488700B5033C /* JWTEncodeTests.swift in Sources */, - 271E108D1F9041C400B5033C /* CompactJSONDecoderTests.swift in Sources */, - 279D63AF1AD07FFF0024E2BC /* JWTDecodeTests.swift in Sources */, - 271E10931F9049A400B5033C /* PayloadTests.swift in Sources */, - 271E10951F9049E200B5033C /* ClaimSetTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B62161C7753D8005D4844 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 271E10811F90253300B5033C /* JWA.swift in Sources */, - 273011171F34029900219C35 /* HMACCommonCrypto.swift in Sources */, - CD9B62171C7753D8005D4844 /* Claims.swift in Sources */, - 501BF92F1FAB05AE00449B76 /* CompactJSONEncoder.swift in Sources */, - CD9B62181C7753D8005D4844 /* JWT.swift in Sources */, - CD9B62191C7753D8005D4844 /* Decode.swift in Sources */, - 277794111DF22D0D00573F3E /* Encode.swift in Sources */, - 2777940C1DF22BE400573F3E /* JOSEHeader.swift in Sources */, - 277794061DF221F800573F3E /* ClaimSet.swift in Sources */, - 273011001F33EABA00219C35 /* HMAC.swift in Sources */, - 501BF9301FAB05C500449B76 /* CompactJSONDecoder.swift in Sources */, - CD9B621A1C7753D8005D4844 /* Base64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B62281C7753EC005D4844 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 271E10821F90253300B5033C /* JWA.swift in Sources */, - 273011181F34029A00219C35 /* HMACCommonCrypto.swift in Sources */, - CD9B62291C7753EC005D4844 /* Claims.swift in Sources */, - 501BF9311FAB05E400449B76 /* CompactJSONEncoder.swift in Sources */, - CD9B622A1C7753EC005D4844 /* JWT.swift in Sources */, - CD9B622B1C7753EC005D4844 /* Decode.swift in Sources */, - 277794121DF22D0D00573F3E /* Encode.swift in Sources */, - 2777940D1DF22BE400573F3E /* JOSEHeader.swift in Sources */, - 277794071DF221F800573F3E /* ClaimSet.swift in Sources */, - 273011011F33EABA00219C35 /* HMAC.swift in Sources */, - 501BF9331FAB05E700449B76 /* CompactJSONDecoder.swift in Sources */, - CD9B622C1C7753EC005D4844 /* Base64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD9B623A1C7753FB005D4844 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 271E10831F90253300B5033C /* JWA.swift in Sources */, - 273011191F34029A00219C35 /* HMACCommonCrypto.swift in Sources */, - CD9B623B1C7753FB005D4844 /* Claims.swift in Sources */, - 501BF9321FAB05E400449B76 /* CompactJSONEncoder.swift in Sources */, - CD9B623C1C7753FB005D4844 /* JWT.swift in Sources */, - CD9B623D1C7753FB005D4844 /* Decode.swift in Sources */, - 277794131DF22D0D00573F3E /* Encode.swift in Sources */, - 2777940E1DF22BE400573F3E /* JOSEHeader.swift in Sources */, - 277794081DF221F800573F3E /* ClaimSet.swift in Sources */, - 273011021F33EABA00219C35 /* HMAC.swift in Sources */, - 501BF9341FAB05E700449B76 /* CompactJSONDecoder.swift in Sources */, - CD9B623E1C7753FB005D4844 /* Base64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 279D63AA1AD07FFF0024E2BC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 279D639B1AD07FFF0024E2BC /* JWT-OSX */; - targetProxy = 279D63A91AD07FFF0024E2BC /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 279D63B01AD07FFF0024E2BC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SWIFT_INCLUDE_PATHS = "$(SRCROOT)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 279D63B11AD07FFF0024E2BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SWIFT_INCLUDE_PATHS = "$(SRCROOT)"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 279D63B31AD07FFF0024E2BC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 279D63B41AD07FFF0024E2BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 279D63B61AD07FFF0024E2BC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/JWTTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 279D63B71AD07FFF0024E2BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/JWTTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - CD9B62211C7753D8005D4844 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CD9B62221C7753D8005D4844 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - CD9B62331C7753EC005D4844 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; - }; - name = Debug; - }; - CD9B62341C7753EC005D4844 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - CD9B62451C7753FB005D4844 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - CD9B62461C7753FB005D4844 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = JWT/Info.plist; - INSTALL_PATH = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - VALIDATE_PRODUCT = YES; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 279D63961AD07FFF0024E2BC /* Build configuration list for PBXProject "JWT" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 279D63B01AD07FFF0024E2BC /* Debug */, - 279D63B11AD07FFF0024E2BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 279D63B21AD07FFF0024E2BC /* Build configuration list for PBXNativeTarget "JWT-OSX" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 279D63B31AD07FFF0024E2BC /* Debug */, - 279D63B41AD07FFF0024E2BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 279D63B51AD07FFF0024E2BC /* Build configuration list for PBXNativeTarget "JWTTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 279D63B61AD07FFF0024E2BC /* Debug */, - 279D63B71AD07FFF0024E2BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CD9B62201C7753D8005D4844 /* Build configuration list for PBXNativeTarget "JWT-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CD9B62211C7753D8005D4844 /* Debug */, - CD9B62221C7753D8005D4844 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CD9B62321C7753EC005D4844 /* Build configuration list for PBXNativeTarget "JWT-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CD9B62331C7753EC005D4844 /* Debug */, - CD9B62341C7753EC005D4844 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CD9B62441C7753FB005D4844 /* Build configuration list for PBXNativeTarget "JWT-watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CD9B62451C7753FB005D4844 /* Debug */, - CD9B62461C7753FB005D4844 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 279D63931AD07FFF0024E2BC /* Project object */; -} diff --git a/JWT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JWT.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index e3cefe8..0000000 --- a/JWT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-OSX.xcscheme b/JWT.xcodeproj/xcshareddata/xcschemes/JWT-OSX.xcscheme deleted file mode 100644 index dc61530..0000000 --- a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-OSX.xcscheme +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-iOS.xcscheme b/JWT.xcodeproj/xcshareddata/xcschemes/JWT-iOS.xcscheme deleted file mode 100644 index 387dbf8..0000000 --- a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-iOS.xcscheme +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-tvOS.xcscheme b/JWT.xcodeproj/xcshareddata/xcschemes/JWT-tvOS.xcscheme deleted file mode 100644 index 46efb5f..0000000 --- a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-tvOS.xcscheme +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-watchOS.xcscheme b/JWT.xcodeproj/xcshareddata/xcschemes/JWT-watchOS.xcscheme deleted file mode 100644 index c0bf55d..0000000 --- a/JWT.xcodeproj/xcshareddata/xcschemes/JWT-watchOS.xcscheme +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JWT/Info.plist b/JWT/Info.plist deleted file mode 100644 index ba3fdf1..0000000 --- a/JWT/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSHumanReadableCopyright - Copyright © 2015 Cocode. All rights reserved. - NSPrincipalClass - - - diff --git a/JWT/JWT.h b/JWT/JWT.h deleted file mode 100644 index 1af30d5..0000000 --- a/JWT/JWT.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// JWT.h -// JWT -// -// Created by Kyle Fuller on 04/04/2015. -// Copyright (c) 2015 Cocode. All rights reserved. -// - -#import - -//! Project version number for JWT. -FOUNDATION_EXPORT double JWTVersionNumber; - -//! Project version string for JWT. -FOUNDATION_EXPORT const unsigned char JWTVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import From 9bb5fea7bf582b6a347bc1ccbe687c389bec25cc Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 7 Feb 2018 22:12:35 +0000 Subject: [PATCH 3/4] chore: Restore building on all platforms using generated Xcode --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index cbcea7f..7674264 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,9 @@ install: - git submodule update --init --recursive script: - swift test -#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-OSX test -sdk macosx; fi -#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-iOS build -sdk iphonesimulator; fi -#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-tvOS build -sdk appletvsimulator; fi -#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-watchOS build -sdk watchsimulator; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then swift package generate-xcodeproj; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package test -sdk macosx; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk iphonesimulator; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk appletvsimulator; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk watchsimulator; fi #- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod lib lint --allow-warnings; fi From 449c0d298dd1093a0c0b4d05933b0bdf898b1106 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 7 Feb 2018 22:32:17 +0000 Subject: [PATCH 4/4] chore: Refactor Travis to use build matrix --- .travis.yml | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7674264..c154c5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,41 @@ os: -- linux -- osx + - osx + - linux +osx_image: xcode9 language: generic sudo: required dist: trusty -osx_image: xcode9 env: -- SWIFT_VERSION=4.0 + global: + - SWIFT_VERSION=4.0 + matrix: + - SWIFTPM_BUILD=true + - SWIFTPM_TEST=true + - XCODE_TEST_SDK=macosx + - XCODE_BUILD_SDK=iphonesimulator + - XCODE_BUILD_SDK=appletvsimulator + - XCODE_BUILD_SDK=watchsimulator + +matrix: + exclude: + # LinuxMain.swift is out of sync + - os: linux + env: SWIFTPM_TEST=true + - os: linux + env: XCODE_TEST_SDK=macosx + - os: linux + env: XCODE_BUILD_SDK=iphonesimulator + - os: linux + env: XCODE_BUILD_SDK=appletvsimulator + - os: linux + env: XCODE_BUILD_SDK=watchsimulator + install: -- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"; fi -- git submodule update --init --recursive + - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" + script: -- swift test -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then swift package generate-xcodeproj; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package test -sdk macosx; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk iphonesimulator; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk appletvsimulator; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk watchsimulator; fi -#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod lib lint --allow-warnings; fi +- if [ -n "$SWIFTPM_BUILD" ]; then swift build; fi +- if [ -n "$SWIFTPM_TEST" ]; then swift test; fi +- if [ -n "$XCODE_BUILD_SDK" ] || [ -z "$XCODE_TEST_SDK" ]; then swift package generate-xcodeproj; fi +- if [ -n "$XCODE_BUILD_SDK" ]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package build -sdk $XCODE_BUILD_SDK; fi +- if [ -n "$XCODE_TEST_SDK" ]; then xcodebuild -project JWT.xcodeproj -scheme JWT-Package test -sdk $XCODE_TEST_SDK; fi