Neptunium, Promethium, Manganese
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    passport-scope-restrictpublic

    passport-scope-restrict Build Status

    Enforce authorization based on OAuth scopes set by Passport.js.

    This is typically used to protect an API by requiring that the scopes associated with the client are allowed to call the API. Check out passport-http-bearer for one strategy you can build on to achieve this.

    Examples

    var express = require('express')
      , passport = require('passport')
      , restrict = require('passport-scope-restrict');
     
    // setup your Express app, and configure Passport with some strategy which add `scopes` to `req.authInfo`.
     
    app.use('/api/admin', restrict('admin'));

    License

    MIT. See LICENSE for details.

    Keywords

    none

    install

    npm i passport-scope-restrict

    Downloadsweekly downloads

    1

    version

    0.1.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar