Giter VIP home page Giter VIP logo

nodeauth's Introduction

nodeAuth

This app has the following major functionalities -

  • Generation of JWT Tokens
  • Validation of User using using that JWT Token
  • Updation of User password via PATCH Requests

Endpoint functionality (Public Endpoints)

Generation of New Token
  • Generation of New Token to Log In based on user Identity (Request body should contain an arbitrary username)
  • Returns a signed Json Web Token, which can be used to validate future requests.
Validation of Token
  • The JWT obtained in the “Login” endpoint must be present in request. If the JWT is missing or invalid, user will not be able to sign in.
  • Returns a Response message mentioning if the request is invalid or successfull for loggin in.
Updation of Password
  • Using the username existing password can be changed. Existing “uname“ must be present in the request.
  • Returns a Response message mentioning if the request is invalid or successfull for changing user password

Test Suite

Setup

Usage

  • Start the server with npm start
  • Run the test suite with npm test

What's new?

  • Added MySQL Compatibility. Credentials are now stored and retrieved from MYSQL Database
  • Appropriate statusCodes and responses attached to responses for all APIs

List of APIs

  • tokenGenerator - To Generate a New Token for new User based on username and password
  • tokenValidator - To Validate if a user is a returning user, dependent on the token provided
  • userUpdater - To update existing user's password based on his / her username

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.