From ef63e436fca0ba576953be6450d437a2c5b64667 Mon Sep 17 00:00:00 2001 From: Ge Will <531sunlight@gmail.com> Date: Mon, 26 Feb 2024 12:38:06 +0800 Subject: [PATCH] Modify JWT access level to public Can catch let error as JWT.Error, get correct error localizedDescription --- Sources/JWT/JWT.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/JWT/JWT.swift b/Sources/JWT/JWT.swift index e6cff891..de150d1c 100644 --- a/Sources/JWT/JWT.swift +++ b/Sources/JWT/JWT.swift @@ -50,7 +50,7 @@ protocol JWTCreatable { func signedToken(using privateKey: JWT.PrivateKey) throws -> JWT.Token } -struct JWT: Codable, JWTCreatable { +public struct JWT: Codable, JWTCreatable { public enum Error: Swift.Error, LocalizedError { @@ -70,8 +70,8 @@ struct JWT: Codable, JWTCreatable { } } - typealias Token = String - typealias PrivateKey = P256.Signing.PrivateKey + public typealias Token = String + public typealias PrivateKey = P256.Signing.PrivateKey typealias DateProvider = () -> Date static let defaultDateProvider: DateProvider = {