Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grandlinex/bundle-simple-auth

Simple auth for Grandline Kernel
https://github.com/grandlinex/bundle-simple-auth

authorization backend bundle express framework grandlinex npm-package typescript

Last synced: 24 days ago
JSON representation

Simple auth for Grandline Kernel

Awesome Lists containing this project

README

        

# 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
```bash
npm i @grandlinex/bundle-simple-auth
```
2. Load module
```typescript
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](https://badge.fury.io/gh/grandlinex%2Fbundle-simple-auth.svg)](https://github.com/GrandlineX/bundle-simple-auth)
[![NPM](https://img.shields.io/static/v1?label=NPM&message=Package&color=red&logo=NPM)](https://www.npmjs.com/package/@grandlinex/bundle-simple-auth)
![TS](https://img.shields.io/static/v1?label=Language&message=TypeScript&color=blue&logo=TypeScript)

### Status
![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=alert_status)
![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=security_rating)
![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=sqale_rating)
![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=reliability_rating)
![Coverage](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=coverage)

### Issues
![Bugs](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=bugs)
![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=vulnerabilities)
![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-simple-auth&metric=code_smells)

## Documentation
- [Documentation](https://grandlinex.github.io/bundle-simple-auth/)
- [GrandLineX Docs](https://grandlinex.github.io/docs/)
- [GrandLineX Project](https://grandlinex.github.io/)