Skip to content

Instantly share code, notes, and snippets.

@timbaev
Last active January 25, 2019 14:58
Show Gist options
  • Save timbaev/aa77d4694ff34a7bb19bb93f369c8e95 to your computer and use it in GitHub Desktop.
Save timbaev/aa77d4694ff34a7bb19bb93f369c8e95 to your computer and use it in GitHub Desktop.
JWT Configuration file
import JWT
enum JWTConfig {
static let signerKey = "JWT_API_SIGNER_KEY" // Key for signing JWT Access Token
static let header = JWTHeader(alg: "HS256", typ: "JWT") // Algorithm and Type
static let signer = JWTSigner.hs256(key: JWTConfig.signerKey) // Signer for JWT
static let expirationTime: TimeInterval = 100 // In seconds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment