index.js
function verify (key, scopes, callback) {
    db.get(key, function (err, account) {
      if (err) return callback(err)
      var scopeAccess = verifyScopes(account, scopes)
      if (scopeAccess) return callback(null, account)
      else callback(new Error('Access denied'))
    })
  }
function verify (key, scopes, callback) {
    db.get(key, function (err, account) {
      if (err) return callback(err)
      var scopeAccess = verifyScopes(account, scopes)
      if (scopeAccess) return callback(null, account)
      else callback(new Error('Access denied'))
    })
  }
function verify ( key , scopes , callback ) { db . get ( key , function ( err , account ) { if ( err ) return callback ( err ) var scopeAccess = verifyScopes ( account , scopes ) if ( scopeAccess ) return callback ( null , account ) else callback ( new Error ( 'Access denied' ) ) } ) }
Verify that a set of scopes match what is in the db for a key

@name access.verify
@memberof townshipAccess
@param {string} key - the key for the access scopes
@param {array} scopes - array of strings with scopes that must match
@param {function} callback - callback with `err`, `data` arguments
Verify that a set of scopes match what is in the db for a key