Skip to content

Instantly share code, notes, and snippets.

// 1. Generate UNIX timestamp in seconds
const timestamp = Math.floor(Date.now() / 1000);
const expiration = timestamp + 300; // Token valid for 5 minutes
const header = {
"alg": "HS256",
"typ": "JWT"
};
// 2. Define Payload with your specific claims
@gocanto
gocanto / .travis.yml
Last active September 29, 2018 08:06
MySQL 5.7 Travis CI configuration
language: php
php:
- 7.0
- 7.1
services:
- mysql
addons: