vapor-docs/3.0/docs/jwt/index.md

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.