0.1.4 • Published 7 years ago

touress-fe-core v0.1.4

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Touress Core - Frontend

Core logic for frontend side should be all here (www, admin and mobile app)

Installation

$ npm install --save touress-fe-core

Usage

// import the module
let core = requrire('touress-fe-core');

// for authentication use 'auth' object
let errors = core.auth.validateCredentials('your-username', 'your-password');

if(errors.size() > 0){
  // handle errors
}

// success, do something else

API

  • Authentication - auth

    1. .login(username, password) - A function to login using username and password, mostly with end customers.

      • return : Promise for success and error.
    2. .loginWithCompanyCode(username, password, companyCode) - A function to login using username, password and companyCode. It will be used by admin.

      • return : Promise for success and error.
    3. .validateCredentials(username, password) - A function to validate whether or not the username and password you pass in are valid.

      • return : errors as string[], contain one or more error message.
0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago