Skip to content

Microservice created to learn more about Infrastructure, Node.js, Deploy and JWT. The highest purpose of this project is improve the working flow of the CITi Junior Enterprise.

License

Notifications You must be signed in to change notification settings

Giovaniavs/Microservice-JWT-Auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice-JWT-Auth

My first motivation to build this Microservice was to help the Junior Enterprise CITi to automize it's process of development work. For that, I've builded this Node.js application with Expres.js micro-framework to assembly the server, and structured the Core of this Microservice with the jsonwebtoken module of Node.

This applications works following theses next steps:
1- Recive some JWT by the Bearer Token request.
2 - Run the script looking for incompatibilities, like the different secrets used to encrypt the same variable.
3 - And finilly, returns the data of the JWT.

With that, you're abble to construct different ways to work with this response in the frontend. To help you a little bit with theses ways, I created a simple sample to return True if the JWT is valid, or return False wether the JWT is invalid. This sample is in the client folder located in the root of the project.

If you have any feedback or improvements for this Microservice, please contact me and let's talk about it! 🙂

Feature

Response data


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need to have npm or yarn installed on your machine.

Installing

To run the project for the first time you must follow this steps:

  1. Clone the GitHub repository
git clone https://github.com/Giovaniavs/Microservice-JWT-Auth.git
  1. Install the dependencies
yarn install

or just

yarn
  1. Add the .env file in the root of the project containing two variables:
PORT=
SECRET=

Obs: Only me have the valid SECRET, if you want to use this microservice, talk to me!

  1. Run the project! Go to the root of the project and run the command:
yarn start

The Developer

  • Giovani Albuquerque - Full Stack Developer - Giovaniavs

Made by The Giovani Albuquerque

About

Microservice created to learn more about Infrastructure, Node.js, Deploy and JWT. The highest purpose of this project is improve the working flow of the CITi Junior Enterprise.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published