diff --git a/Package.swift b/Package.swift index f10a699..b43af68 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), .package(url: "https://github.com/vapor/vapor.git", from: "3.0.1"), - .package(url: "https://github.com/vapor/jwt.git", from: "3.0.0-rc.2.1.1") + .package(url: "https://github.com/vapor/jwt.git", from: "3.0.0") ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/Sources/Ferno/Provider.swift b/Sources/Ferno/Provider.swift index dfd4247..eb7f797 100644 --- a/Sources/Ferno/Provider.swift +++ b/Sources/Ferno/Provider.swift @@ -9,16 +9,16 @@ import Vapor import JWT struct Payload: JWTPayload { + + func verify(using signer: JWTSigner) throws { + try exp.verifyNotExpired() + } + var iss: IssuerClaim var scope: String var aud: String var exp: ExpirationClaim var iat: IssuedAtClaim - - - func verify() throws { - try exp.verify() - } } public struct AccessToken {