web-auth-token

1.0.6 • Public • Published

web-auth-token

Web rest api authentication token

Install

$ npm install --save web-auth-token

Usage

Step 1

var authToken = require('web-auth-token');
 
var data = {
   "username": "abcd",
   "password": "123456"
 }
authToken.authTokenUserCreate(data, function(result) {
   console.log(result);
});
 

Step 2

var authToken = require('web-auth-token');
 
var data = {
   "username": "abcd",
   "password": "123456",
   "expiredTime" : 0 // Expired in second "0" is unlimited
 }
authToken.authTokenGenarate(data, function(result) {
   console.log(result);
});
 

Step 3

var authToken = require('web-auth-token');
 
var secretKey = '40e500de41432de6ae60bfc0b75dccccba3a24af5c33509ae294491447840b23';
 
authToken.authTokenVerify(secretKey, function(result){
   console.log(result);
});
 

Features

This is a Node API package to secure any API created through Node Js. Following are main features of this package.

  • A web authentication user will be created.
  • With authenticated user information a secret key will be generated.
  • Attach the secret key with any API.
  • Verify the API with this secret key.

license

Matrix Media Solutions Pvt. Ltd.

Readme

Keywords

Package Sidebar

Install

npm i web-auth-token

Weekly Downloads

8

Version

1.0.6

License

Matrix Media Solutions Pvt. Ltd.

Unpacked Size

11.2 kB

Total Files

4

Last publish

Collaborators

  • dilipabc