expresswall

0.0.2 • Public • Published

expresswall Build Status NPM version

expresswall is a basic authentication middleware for express.js. It is heavily inspired by parts of Symfony2's Security component.

What?

expresswall takes care of redirecting users to the login or denying access to secured ressources. You just defined whats secure or public by URL patterns.

Installation

expresswall can be installed via npm.

npm install expresswall

Usage

    var expresswall = require('expresswall')
 
    …
 
    var wall = expresswall({
      areas: {
        static: { pattern: /^\/(css|js|font)/ },
        login: { pattern: /^\/login/ },
        secure: {
            pattern: /^\//,
            secured: true,
            redirect_to_login: true
        }
      }
    })
 
    …
 
    app.use(express.session({ … }))
    app.use(wall.middleware())
    app.use(app.router)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i expresswall

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • masch