/KiPerFiB-REST-API

A simple REST API built using Node.js and Express.js and few other magics.

Primary LanguageJavaScript


Logo

KiPerFiB REST API

Simple REST API for IDAM integration.

KiPerFiB REST API

Kinda Perfect File Based REST API

About The Project

A simple REST API built using Node.js and Express.js and few other magics.

Uses JSON files for persistance storage.

Primarily created to use as a Source/Target for IDAM Tools. But can be used for other things....

Built With

Features

  • Mutiple Objects for managing(Employees & Groups)
  • Support mutiple authentication methods
    • No Authentication
    • UserName and Password based authentication
    • Permanant API Token based authentication
    • JWT Token based authentication(Refer Todo)
  • Follows general public API standards
  • Strict schema validation
  • Supports pagging
  • Supports password set and reset

Getting Started

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/shandeepc/KiPerFiB-REST-API.git
  2. Install NPM packages

    npm install
  3. Update Port number in .env(Optional)

    PORT = 6969
  4. Update secret in .env(Optional)

    Generate secrets by executing below command in Node console

       require('crypto').randomBytes(64).toString('hex')

    Copy the generated SECRET and place in ACCESS_TOKEN_SECRET

    Example :- ACCESS_TOKEN_SECRET=c11242e5719f3e42b46e50b7c13adcdb090bc148fdf94cd64418fc8d6e22e9ce09c58f5078b58bd6a6c52ed54ebb7c56ef93dd7fc9a7730420a0a24394322e6d

    Perform same above step again and place in REFRESH_TOKEN_SECRET

    Example :- REFRESH_TOKEN_SECRET=2d9c69c1caa4611ecdee16b03953d98c05e55e31bbca503aae4fda8b931360ae390db579f58539065d551869487cce5e272e9b757f7166e7fd9b16583f140898

Usage

Start the application by either typing

npm start

or

node server

Todo

  • Employees MVC
  • Basic Authentication
  • Simple API Authentication
  • Employees Password MVC
  • Groups MVC
  • JWT Authentication
  • Fix IDAM warnings
  • Implement PATCH Operation
  • Support sorting and filtering
  • Fix cross auth bug(Secret..Sush)
  • Add JWT Refresh via POST
  • Implement OAuth(Sort Of)

Roadmap

  • Simulate OAuth2.0 Authentication mechanism
  • Add GUI
  • Add Native app

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Shandeep - @shandeepsrinivas - www.shandeep.tk

KiPerFiB REST API: https://github.com/shandeepc/KiPerFiB-REST-API