scope-test
v1.1.1
Published
Simple util to test collections of granted scope against required one
Downloads
11
Readme
scope-test
Simple util to test collections of granted scope against required one.
Features
- Isomorphic module
- Error with missing scopes
- Case insensitive option
- Flowtype definition
Installation
$ npm install scope-test
Usage
import { scopeTest } from 'scope-test';
try {
scopeTest([ 'email' ], {
requiredScopes: [ 'email', 'profile' ],
ignoreCase: true
});
} catch (err) {
console.log(err.missingScopes);
}
Licences
Scope-test is licensed under the MIT License.