0.22.0 • Published 2 years ago

@grandlinex/bundle-simple-auth v0.22.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

GrandLineX simple auth bundle

Simple user management and auth for the GrandLineX Kernel

Requirements

  • GrandLineX Kernel Project with postgreSQL configuration

Features

  • Simple user & user roll management
    • Default Admin user
  • Authorize user with JWT

    • Supported JWT options
      • Cookie
      • Path
      • Header

Install

  1. Install package
   npm i @grandlinex/bundle-simple-auth
  1. Load module
import Kernel,{PGCon,SQLCon} from '@grandlinex/kernel';
import SimpleAuth from '@grandlinex/bundle-simple-auth';


export default class ExampleKernel extends Kernel {
  constructor( ) {
    super({
      appName: 'App',
      appCode: 'app'
    });
    // Variant with InMemDb [non persistent - only for dev]
    this.addModule(new SimpleAuth(ik));
    // Variant with Postgessql
    this.addModule(new SimpleAuth(ik,(module)=>new PGCon(module,"0")));
    // Variant with SQLight
    this.addModule(new SimpleAuth(ik,(module)=>new SQLCon(module,"0")));
  }
}

Description

GrandLineX is an out-of-the-box server framework.

GitHub NPM TS

Status

Quality Gate Status Security Rating Maintainability Rating Reliability Rating Coverage

Issues

Bugs Vulnerabilities Code Smells

Documentation