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

Commit

Permalink
apns: Update all of the requirements to use the latest releases
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycastelli committed Aug 27, 2018
1 parent ae48071 commit 1111e64
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
48 changes: 24 additions & 24 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,53 @@
"repositoryURL": "https://github.com/vapor/core.git",
"state": {
"branch": null,
"revision": "a909eccc41941faac6fb9e511cdb9a5cb30a05de",
"version": "3.1.7"
"revision": "7f56a09995bf3c8df562be456bdcda405d9d0678",
"version": "3.4.1"
}
},
{
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"state": {
"branch": null,
"revision": "1b8c2ba5a42f1adf2aa812204678d8b16466fa59",
"version": "3.1.2"
"revision": "4b85405430df1892ee3aa1554bdb477e96cf46ad",
"version": "3.2.0"
}
},
{
"package": "DatabaseKit",
"repositoryURL": "https://github.com/vapor/database-kit.git",
"state": {
"branch": null,
"revision": "0db303439e5ef8b6df50a2b6c4029edddee90cb0",
"version": "1.0.1"
"revision": "7a01659316b9f033fa2150d5cd5e9d3c3e46c2e3",
"version": "1.3.0"
}
},
{
"package": "HTTP",
"repositoryURL": "https://github.com/vapor/http.git",
"state": {
"branch": null,
"revision": "9246340ae4c5310627099349fc74785267b55607",
"version": "3.0.5"
"revision": "0fac5c7c9ab1e424621ba001d83cb59ffca99ad2",
"version": "3.1.1"
}
},
{
"package": "JWT",
"repositoryURL": "https://github.com/vapor/jwt.git",
"state": {
"branch": null,
"revision": "6acca0abfe335ce7585d678cd721e8a0e3c7a053",
"version": "3.0.0-rc.2.1.1"
"revision": "2e225c722bf26407c1c4bd11d341e48759f46095",
"version": "3.0.0"
}
},
{
"package": "Multipart",
"repositoryURL": "https://github.com/vapor/multipart.git",
"state": {
"branch": null,
"revision": "7778dcb62f3efa845e8e2808937bb347575ba7ce",
"version": "3.0.1"
"revision": "e57007c23a52b68e44ebdfc70cbe882a7c4f1ec3",
"version": "3.0.2"
}
},
{
Expand All @@ -87,17 +87,17 @@
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "a5db2a67515ad2b490ac5646db204a5edf939f47",
"version": "1.6.1"
"revision": "cf08e673dc41dc63d34065234c8fc432e8d334c4",
"version": "1.9.2"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "38955a5f806a952daf2b16fbfe9aa529749cf1dd",
"version": "1.1.0"
"revision": "6617eb0d3afcb12170594968df01ca63afb58ac5",
"version": "1.2.0"
}
},
{
Expand All @@ -123,35 +123,35 @@
"repositoryURL": "https://github.com/vapor/template-kit.git",
"state": {
"branch": null,
"revision": "43b57b5861d5181b906ac6411d28645e980bb638",
"version": "1.0.1"
"revision": "db35b1c35aabd0f5db3abca0cfda7becfe9c43e2",
"version": "1.1.0"
}
},
{
"package": "URLEncodedForm",
"repositoryURL": "https://github.com/vapor/url-encoded-form.git",
"state": {
"branch": null,
"revision": "57cf7fb9c1a1014c50bc05123684a9139ad44127",
"version": "1.0.3"
"revision": "cbfe7ef6301557d3f2d0807a98165232ae06e1c6",
"version": "1.0.4"
}
},
{
"package": "Validation",
"repositoryURL": "https://github.com/vapor/validation.git",
"state": {
"branch": null,
"revision": "ab6c5a352d97c8687b91ed4963aef8e7cfe0795b",
"version": "2.0.0"
"revision": "156f8adeac3440e868da3757777884efbc6ec0cc",
"version": "2.1.0"
}
},
{
"package": "Vapor",
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "8c73eebf7c41c7d8bf83ff87f550e0f97d6aadc4",
"version": "3.0.2"
"revision": "54632a6c1e7ecd9923c0d00b612de936de1c4745",
"version": "3.0.8"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
.package(url: "https://github.com/vapor/jwt.git", from: "3.0.0-rc"),
.package(url: "https://github.com/vapor/jwt.git", from: "3.0.0"),
],
targets: [
.target(name: "APNS", dependencies: ["Vapor", "JWT"]),
Expand Down
4 changes: 2 additions & 2 deletions Sources/APNS/APNSJWTPayload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct APNSJWTPayload: JWTPayload {
let iat = IssuedAtClaim(value: Date())
let exp = ExpirationClaim(value: Date(timeInterval: 3500, since: Date()))

func verify() throws {
try self.exp.verify()
func verify(using signer: JWTSigner) throws {
try self.exp.verifyNotExpired()
}
}
2 changes: 1 addition & 1 deletion Sources/APNS/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class Profile {
let JWTheaders = JWTHeader(alg: "ES256", cty: nil, crit: nil, kid: self.keyId)
let payload = APNSJWTPayload(iss: self.teamId)
let signer = JWTSigner(algorithm: ES256(key: self.privateKey))
var jwt = JWT(header: JWTheaders, payload: payload)
let jwt = JWT(header: JWTheaders, payload: payload)
let signed = try jwt.sign(using: signer)
guard let token = String(bytes: signed, encoding: .utf8) else {
throw TokenError.tokenWasNotGeneratedCorrectly
Expand Down

0 comments on commit 1111e64

Please sign in to comment.