commit | 50921c7e42064ee88b32226752f57be671e5603e | [log] [tgz] |
---|---|---|
author | Pavlin Angelov <pavlin.angelov@miracl.com> | Mon Nov 07 17:21:17 2016 +0200 |
committer | Pavlin Angelov <pavlin.angelov@miracl.com> | Mon Nov 07 18:10:29 2016 +0200 |
tree | ef9a7f65e9c1f070b0b8c9c279c606798bf5f799 | |
parent | 1914a96164c8c0192a2fcbb05095ef34bca051e5 [diff] |
Make initialisation of local storage This should fix several problems
$ 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: