township-token
Create JWT tokens using township auth & access data.
Install
npm i -g township-token
Examples
Basic example:
var level = var townshipToken = var db = var tokens = // create a tokenvar token = tokens // verify and decode a tokentokens
Full example with township-auth & township-access:
var level = var townshipToken = var townshipAccess = var townshipAuth = var basic = var db = var tokens = var access = var auth = var creds = basic: email: 'hi@example.com' password: 'oops' // create an auth recordauth
API
Read the API docs for this module in docs/API.md
See also
- township-auth - manage authentication credentials
- township-access - manage access authorization scopes