Skip to content

Token Genaration API calls UUID

siddharthakonakanchi edited this page Dec 5, 2017 · 4 revisions

Index

  1. Description
  2. API Calls
  3. Data Base Details
  4. Packages Used

Description

This is a UUID API used to generate

API

This API call will be called internally to generate a random token that has properties like expiry date, used etc. This token is sent to to the user mail in the form of String attached to URL in GET request. When the user clicks on the URL within 24 hours(default)expiry time and sets the password. The Database is updated with new details based on the generated token value Here the URL can be clicked only once.

Endpoint

users/reset/:token

Method
GET  
Fields
Key Description Type Required
token Random Value used to String Yes
Response

Status codes: 200,400,501
Example:
code: 200 OK

Tables

Table Name: users

Table structure

Key Description Type Required
name Password Encryped Password Yes
email Email ID of the user String Yes
Endpoint

users/reset/:token

Method
POST  
Fields
Key Description Type Required
token Random Value used to keep track of validity String Yes
Password New Password String Yes
Description

This API is used to update the password in database for users table.It updates based on the random unique string which is generated and changes to database in encrtyted form using the decrytps API

Response

Status codes: 200,400,501
Example:
code: 200 OK

Tables

Table Name: users

Table structure

Key Description Type Required
name Password Encryped Password Yes
email Email ID of the user String Yes

Packages Used

UDDI V4 is a module for Node.js applications to generate an unique random ID and set properties to it

Installation

npm install uuid

More information can be obtained from https://www.npmjs.com/package/node-uuid-v4

Clone this wiki locally