@grandlinex/bundle-simple-auth
TypeScript icon, indicating that this package has built-in type declarations

0.22.0 • Public • Published

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

img

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

Package Sidebar

Install

npm i @grandlinex/bundle-simple-auth

Weekly Downloads

3

Version

0.22.0

License

BSD-3-Clause

Unpacked Size

84.6 kB

Total Files

31

Last publish

Collaborators

  • elschnagoo