mirror of https://github.com/vapor/docs.git
722 B
722 B
Using JSON Web Token
JSON Web Token is a library containing all JSON Web Token related APIs.
Index
With Vapor
This package is included with Vapor by default, just add:
import JWT
Without Vapor
To include it in your package, add the following to your Package.swift file.
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "Project",
dependencies: [
...
.package(url: "https://github.com/vapor/jwt.git", .upToNextMajor(from: "3.0.0")),
],
targets: [
.target(name: "Project", dependencies: ["JWT", ... ])
]
)
Use import JSON Web Token to access JSON Web Token's APIs.