commit | 5590da89ca9137658713793315281b3347877f09 | [log] [tgz] |
---|---|---|
author | boyan.bakov <boyan.bakov@miracl.com> | Wed Jul 06 11:06:58 2016 +0300 |
committer | boyan.bakov <boyan.bakov@miracl.com> | Thu Jul 07 11:43:11 2016 +0300 |
tree | 9242a77f211709d3fa1a6726fbfc6189c0add21b | |
parent | f1052009e4d92fee5e23ed1759c64bd1f4972c24 [diff] |
Preparation for support multi authentication protocols
$ git clone
$ cd project_folder
$ npm install
$ grunt build
var mpin = mpinjs({server: <serverIP-and-port>}); mpin.init(<callback>); mpin.makeNewUser(<userId>); mpin.startRegistration(<userId>, <callback>); /* Wait for end-user to confirm identity */ mpin.confirmRegistration(<userId>, <callback>); /* If successful, read desired user secret (PIN or password) */ mpin.finishRegistration(<userId>, <user-secret>);
mpin.startAuthentication(<userId>, <callback>); /* If successful, read user secret (PIN or password) */ mpin.finishAuthentication(<userId>, <user-secret>, <callback>);
mpin.getAccessNumber(<callback>); /* Display Access number to end user */ mpin.waitForMobileAuth(<timeout-sec>, <retry-period-sec>, <callback>); /* If successfull - Authentication completed If exits with timeout, then no successfull authentication from mobile device was completed If one needs to cancel the waiting for authentication from the mobile device, call cancelMobileAuth() */
Install development dependencies:
$ npm install
Then:
$ npm test
Actively tested with node: