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
- Supported JWT options
Install
- Install package
npm i @grandlinex/bundle-simple-auth
- 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.