You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by sa...@apache.org on 2016/08/05 14:19:30 UTC

[03/37] incubator-milagro-mfa-js-lib git commit: Update instructions

Update instructions


Project: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/commit/b3762779
Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/tree/b3762779
Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/diff/b3762779

Branch: refs/heads/add-documentation
Commit: b3762779ac7c2ba0ea055e5f139aec0f4468977b
Parents: c86c030
Author: Simeon Aladjem <si...@certivox.com>
Authored: Wed Dec 16 17:57:48 2015 +0200
Committer: Vladislav Mitov <vl...@certivox.com>
Committed: Fri Dec 18 18:55:25 2015 +0200

----------------------------------------------------------------------
 README.md | 48 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/blob/b3762779/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 337a5ce..7bdcacf 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-# MPIN frontend library
-
+# Headless M-Pin Client Library
 
 ## Requirement for build & testing
 
 1. Nodejs
 2. Grunt
 3. Mocha
-4. bower
+4. Bower
 
 ## Installation
+
 ```bash
 $ git clone
 $ cd project_folder
@@ -16,33 +16,53 @@ $ npm install
 $ grunt build
 ```
 
-## Example simple usage:
+## Simple usage example
 
 - Registration
 
 ```js
-var mpin = mpinjs({server: serverIP_port});
+var mpin = mpinjs({server: <serverIP-and-port>});
+
+mpin.init(<callback>);
 
-mpin.init(callback);
+mpin.makeNewUser(<userId>);
 
-mpin.makeNewUser(userId);
+mpin.startRegistration(<userId>, <callback>);
 
-mpin.startRegistration(usrId, callback);
+/* Wait for end-user to confirm identity */
 
-mpin.confirmRegistration(userId, callback);
+mpin.confirmRegistration(<userId>, <callback>);
 
-mpin.finishRegistration(userId, userPin);
+/* If successful, read desired user secret (PIN or password) */
+
+mpin.finishRegistration(<userId>, <user-secret>);
 
 ```
 - Authentication
 
 ```js
-mpin.startAuthentication(userId, callback);
+mpin.startAuthentication(<userId>, <callback>);
 
-mpin.finishAuthentication(userId, userPin, callback);
+/* If successful, read user secret (PIN or password) */
 
+mpin.finishAuthentication(<userId>, <user-secret>, <callback>);
 ```
 
+- Authentication with a mobile device
+
+```js
+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()
+*/
+```
 
 ## Running Tests
 
@@ -61,7 +81,3 @@ $ npm test
 Actively tested with node:
 
   - 0.10.4
-
-## Authors
-
-  * MIRACL Ltd.