commit | c8b7bae1a911d340637f449af571f3201cd7bb17 | [log] [tgz] |
---|---|---|
author | bbvox <bbvox@users.noreply.github.com> | Thu Jul 07 14:00:33 2016 +0300 |
committer | GitHub <noreply@github.com> | Thu Jul 07 14:00:33 2016 +0300 |
tree | b7126bea9914a0f17b99b0d2c796c2db87bb4e52 | |
parent | f1052009e4d92fee5e23ed1759c64bd1f4972c24 [diff] | |
parent | f33c5a1f28c11b7d52409db9209f9bc349dcaa3b [diff] |
Merge pull request #4 from miracl/updateCrypto Update reference to milagro-crypto & remove bower version
$ 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: