Skip to content

ZewoGraveyard/JSONWebToken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONWebToken

Swift Zewo Platform License Slack Travis Codebeat

Usage

import JSONWebToken

let algorithm = JSONWebToken.Algorithm.hs256(key: "some_secret_key".data)

var payload = JSONWebToken.Payload()
payload.expire(after: Int(12.hours))
payload.sub = "username"
let token = try JSONWebToken.encode(payload: payload, algorithm: algorithm)

let decodedPayload = try JSONWebToken.decode(string: token, algorithm: algorithm)

Installation

import PackageDescription

let package = Package(
    dependencies: [
        .Package(url: "https://github.com/Zewo/JSONWebToken.git", majorVersion: 0, minor: 13),
    ]
)

Support

If you need any help you can join our Slack and go to the #help channel. Or you can create a Github issue in our main repository. When stating your issue be sure to add enough details, specify what module is causing the problem and reproduction steps.

Community

Slack

The entire Zewo code base is licensed under MIT. By contributing to Zewo you are contributing to an open and engaged community of brilliant Swift programmers. Join us on Slack to get to know us!

License

This project is released under the MIT license. See LICENSE for details.