From bc3612fe49660380cea7305e93c4e3464c1386b1 Mon Sep 17 00:00:00 2001 From: Kuldar-Daniel Kokorev Date: Thu, 9 May 2024 14:57:51 +0300 Subject: [PATCH] Public access control: expose KBJWT initialiser --- Sources/Issuer/JWT.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Issuer/JWT.swift b/Sources/Issuer/JWT.swift index a1d36e6..b535c5c 100644 --- a/Sources/Issuer/JWT.swift +++ b/Sources/Issuer/JWT.swift @@ -26,7 +26,7 @@ public struct JWT: JWTRepresentable { // MARK: - Lifecycle - init(header: JWSHeader, payload: JSON) throws { + public init(header: JWSHeader, payload: JSON) throws { guard header.algorithm?.rawValue != Keys.none.rawValue else { throw SDJWTError.noneAsAlgorithm } @@ -39,7 +39,7 @@ public struct JWT: JWTRepresentable { self.payload = payload } - init(header: JWSHeader, kbJwtPayload: JSON) throws { + public init(header: JWSHeader, kbJwtPayload: JSON) throws { guard header.algorithm?.rawValue != Keys.none.rawValue else { throw SDJWTError.noneAsAlgorithm }