node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


Akera Logo

Authentication module for web service.


$ npm install akera-web-authentication



To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

Quick Start

This module is designed to be loaded as application level service which is usually done by adding a reference to it in services section of application's configuration.

   "middleware": "akera-web-authentication",
   "config": {
   "route": "/authenticate/",
   "loginRedirect": "/login.html",
   "successRedirect": "/",
   "failureRedirect": "/autherr.html",
   "providers": [
   "strategy": "ldap",
      "url": "ldap://localhost:389",
   "bindDn": "ldapUser",
   "bindCredentials": "passwd",
   "searchBase": "CN=Users,DC=yourdomain,DC=com"
   "strategy": "akera",
   "route": "/server/",
      "host": "localhost",
   "port": 8383
   "strategy": "facebook",
      "clientID": "ID",
   "clientSecret": "secret"
   "strategy": "google",
      "clientID": "ID",
   "clientSecret": "secret"

Service options available:

  • route: the route where the service is going to be mounted (default: '/auth/')

  • loginRedirect: the login page where user will get redirected if session not authenticated

  • successRedirect: the page where user will get redirected when authenticated

  • failureRedirect: the page where user will get redirected when authentication failed

  • providers: an array of authentication providers, supported providers:

    Provider specific configuration can be found on each provider web page.