Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

township-access

An access control module to accompany township-auth.

Install

npm i --save township-access

Example

const townshipAccess = require('township-access')
const level = require('level')

const db = level('db')
const access = townshipAccess(db)
const key = 'pizza'
const scopes = ['site:read', 'site:edit']

access.create(key, scopes, function (err, account) {
  access.verify(key, ['site:edit'], function (err, verified) {
    console.log(verified)
  })
})

Documentation

See also

License

MIT

About

Manage access authorization scopes

Topics

Resources

License

Packages

No packages published