Kinda Perfect File Based REST API
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....
- 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
- Node.js(https://nodejs.org/)
- npm
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/shandeepc/KiPerFiB-REST-API.git
-
Install NPM packages
npm install
-
Update Port number in
.env
(Optional)PORT = 6969
-
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 inACCESS_TOKEN_SECRET
Example :- ACCESS_TOKEN_SECRET=c11242e5719f3e42b46e50b7c13adcdb090bc148fdf94cd64418fc8d6e22e9ce09c58f5078b58bd6a6c52ed54ebb7c56ef93dd7fc9a7730420a0a24394322e6d
Perform same above step again and place in
REFRESH_TOKEN_SECRET
Example :- REFRESH_TOKEN_SECRET=2d9c69c1caa4611ecdee16b03953d98c05e55e31bbca503aae4fda8b931360ae390db579f58539065d551869487cce5e272e9b757f7166e7fd9b16583f140898
Start the application by either typing
npm start
or
node server
- 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)
- Simulate OAuth2.0 Authentication mechanism
- Add GUI
- Add Native app
Distributed under the MIT License. See LICENSE.txt
for more information.
Shandeep - @shandeepsrinivas - www.shandeep.tk
KiPerFiB REST API: https://github.com/shandeepc/KiPerFiB-REST-API