@sphinx-software/fusion-auth

0.0.1 • Public • Published

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')
        ],
    }

Readme

Keywords

none

Package Sidebar

Install

npm i @sphinx-software/fusion-auth

Weekly Downloads

3

Version

0.0.1

License

ISC

Last publish

Collaborators

  • rikky2512