Skip to content

akera-io/akera-web-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akera Logo

Authentication module for Akera.io web service.

Installation

$ npm install akera-web-authentication

Docs

Tests

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.

"services": [
  	{ 
  		"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.

License

MIT

About

Authentication module for Akera.io web service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published