@sphinx-software/fusion-auth
v0.0.1
Published
session authentication package for Sphinx Software
Downloads
7
Readme
Fusion Authenticator
Fusion authenticator is authentication package for Sphinx Software Fusion framework.
Install
$ npm install @sphinx-software/fusion-auth
Usage
Configure session authentication
- authenticate with username and password
{
"session": {
"credentialTable": "credentials",
"identityField": "username",
"passwordField": "password",
"credentialKey": "sphinx-credential"
}
}
- authenticate with email and password
{
"session": {
"credentialTable": "user",
"identityField": "email",
"passwordField": "password",
"credentialKey": "sphinx-credential"
}
}
Register authentication service
module.exports = {
// Services will be used for the application
providers: [
// Extended providers
require('@sphinx-software/fusion-auth/authenticator.provider'),
],
// Services related configuration
auth: require('./auth'),
};
Auth Controller
module.exports = {
//...
injects: [
// Injects dependencies by its metadata here
require('app/http/welcome.controller'),
require('app/http/auth.controller'),
require('app/command/quotes.command')
],
}