commit | ee2107a6d74a3fc23fdc8972f1bea77091a57665 | [log] [tgz] |
---|---|---|
author | bbvox <bbvox@users.noreply.github.com> | Thu Jul 07 14:01:01 2016 +0300 |
committer | GitHub <noreply@github.com> | Thu Jul 07 14:01:01 2016 +0300 |
tree | 348ae1ddb03b873a14d0375eedfc9ae7b8033904 | |
parent | c8b7bae1a911d340637f449af571f3201cd7bb17 [diff] | |
parent | 5590da89ca9137658713793315281b3347877f09 [diff] |
Merge pull request #6 from miracl/multiProtocols 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: