Created
January 25, 2019 14:48
-
-
Save timbaev/453d54305ed52b5d546299d69972dcc3 to your computer and use it in GitHub Desktop.
JWTError extension with own errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import JWT | |
extension JWTError { | |
static let payloadCreation = JWTError(identifier: "TokenHelpers.createPayload", reason: "User ID not found") | |
static let createJWT = JWTError(identifier: "TokenHelpers.createJWT", reason: "Error getting token string") | |
static let verificationFailed = JWTError(identifier: "TokenHelpers.verifyToken", reason: "JWT verification failed") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment