This project has the intention to help developers dive into how OAuth2.0 works, implementing a simple node server. Actually only Authorization Code Flow with Proof Key for Code Exchange (PKCE) is implemented. Note: not for production.
- doc/
- postman/
- src/
- controllers/
- models/
- repositories/
- routes/
- services/
- validators/
- app.js
- config.js
- test/
- config
- www/
This project uses a number of open source projects to work properly:
- Node.js - evented I/O for the backend
- Express - fast node.js network app framework
- Mongoose - elegant mongodb object modeling for node.js
- JWT Auth - JsonWebToken implementation for node.js
- apiDoc - Inline Documentation for RESTful web APIs
- Mocha - simple, flexible, fun javascript test framework for node.js
Prerequisites:
Install the dependencies and devDependencies:
$ cd oauth2-lite-server
$ npm install
Prerequisites:
You need to edit src/config.js and put your configuration variables. How to start the server:
$ npm start
How to start the server with livereload:
$ npm run live
You need to edit the test config file test/config and run:
$ npm test
You can see the API documentation on doc/ folder. If you want to re-generate the documentation, you need to run this comand:
$ apidoc -i src/controllers
Want to contribute? Great! Open your pull requests to the develop
branch
Apache-2.0 See LICENSE.md file