[2/3] incubator-milagro-mfa-js-lib git commit: Update documentation.
Update documentation. 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/a5323595 Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/tree/a5323595 Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/diff/a5323595 Branch: refs/heads/master Commit: a532359558355eaf46999ac7f4b9e5798a3989d7 Parents: ceec48f Author: Simeon Aladjem Authored: Mon Sep 19 19:06:50 2016 +0300 Committer: Simeon Aladjem Committed: Mon Sep 19 19:06:50 2016 +0300 -- README.md | 112 + 1 file changed, 81 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/blob/a5323595/README.md -- diff --git a/README.md b/README.md index b51938b..0a44c3d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Headless M-Pin Client Library +# Headless Milagro Client Library ## Requirement for build & testing @@ -118,7 +118,10 @@ The list of errors is: ### The User object -For each user an object needs to be created. The key to the user object is its identity, which is supposed to be unique. The user object has a _State_ which basically indicates what can be done with the user. For instance, if a user has not been registered, it cannot be authenticated, obviously. The different user states are: +For each user an object needs to be created. The key to the user object is its identity, which is supposed to be unique. +The user object has a _State_ which basically indicates what can be done with the user. +For instance, if a user has not been registered, it cannot be authenticated, obviously. +The different user states are: | State | Description | | - | --- | @@ -132,7 +135,8 @@ For each user an object needs to be created. The key to the user object is its i Callbacks -Some of the API methods have a `callback` parameter. The convention for the callback function is: +Some of the API methods have a `callback` parameter. +The convention for the callback function is: ```js function(error, data) ``` @@ -161,24 +165,29 @@ mpin = new mpinjs({ }) ``` A key/value list of parameters is passed to the constructor as the currently recognized parameters are: -* `server` - _Mandatory_. The address at which the M-Pin Service is accessible. This is usually the address of the Relying Party Application. For instance if the backend is an M-Pin SSO server this would be the address of that server. +* `server` - _Mandatory_. The address at which the _Milagro MFA Service_ is accessible. This is usually the address of the Relying Party Application. For instance if the backend is an _M-Pin SSO_ server this would be the address of that server. * `rpsPrefix` - _Optional_. This parameter could be specified in case `rpsPrefix` parameter in the RPS configuration has been changed and is not the default one. If this option is not specified, then the default `"rps"` is used. # `init(callback)` -This method will attempt to initialize the `mpinjs` instance according the provided options and retrieve users from the storage. It makes a request to retrieve the _Client Settings_ from the server. If the method succeeds, it will return the retrieved client settings as the `data` in the callback function. +This method will attempt to initialize the `mpinjs` instance according the provided options and retrieve users from the storage. +It makes a request to retrieve the _Client Settings_ from the server. +If the method succeeds, it will return the retrieved client settings as the `data` in the callback function. User management API # `makeNewUser(userId, deviceId)` -This method will create a new user object in the internal user storage. The new user will be initialized with the _state_ `"INVALID"`. The received parameters are: -* `userId` - _Mandatory_, String - The identity of the new user. It should be unique for the given server / application. The user object could later on be referred to using this user identity. -* `deviceId` - _Optional_, String - Some description of the local device. This Device ID is passed to the RPA, which might store it and use it later to determine which M-Pin ID is associated with this device. +This method will create a new user object in the internal user storage. +The new user will be initialized with the _state_ `"INVALID"`. +The received parameters are: +* `userId` - _Mandatory_, String - The identity of the new user. It should be a unique for the given server / application. The user object could later on be referred to using this user identity. +* `deviceId` - _Optional_, String - Some descript
incubator-milagro-mfa-js-lib git commit: Update documentation.
Repository: incubator-milagro-mfa-js-lib Updated Branches: refs/heads/add-documentation ceec48fb3 -> a53235955 Update documentation. 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/a5323595 Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/tree/a5323595 Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/diff/a5323595 Branch: refs/heads/add-documentation Commit: a532359558355eaf46999ac7f4b9e5798a3989d7 Parents: ceec48f Author: Simeon Aladjem Authored: Mon Sep 19 19:06:50 2016 +0300 Committer: Simeon Aladjem Committed: Mon Sep 19 19:06:50 2016 +0300 -- README.md | 112 + 1 file changed, 81 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/blob/a5323595/README.md -- diff --git a/README.md b/README.md index b51938b..0a44c3d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Headless M-Pin Client Library +# Headless Milagro Client Library ## Requirement for build & testing @@ -118,7 +118,10 @@ The list of errors is: ### The User object -For each user an object needs to be created. The key to the user object is its identity, which is supposed to be unique. The user object has a _State_ which basically indicates what can be done with the user. For instance, if a user has not been registered, it cannot be authenticated, obviously. The different user states are: +For each user an object needs to be created. The key to the user object is its identity, which is supposed to be unique. +The user object has a _State_ which basically indicates what can be done with the user. +For instance, if a user has not been registered, it cannot be authenticated, obviously. +The different user states are: | State | Description | | - | --- | @@ -132,7 +135,8 @@ For each user an object needs to be created. The key to the user object is its i Callbacks -Some of the API methods have a `callback` parameter. The convention for the callback function is: +Some of the API methods have a `callback` parameter. +The convention for the callback function is: ```js function(error, data) ``` @@ -161,24 +165,29 @@ mpin = new mpinjs({ }) ``` A key/value list of parameters is passed to the constructor as the currently recognized parameters are: -* `server` - _Mandatory_. The address at which the M-Pin Service is accessible. This is usually the address of the Relying Party Application. For instance if the backend is an M-Pin SSO server this would be the address of that server. +* `server` - _Mandatory_. The address at which the _Milagro MFA Service_ is accessible. This is usually the address of the Relying Party Application. For instance if the backend is an _M-Pin SSO_ server this would be the address of that server. * `rpsPrefix` - _Optional_. This parameter could be specified in case `rpsPrefix` parameter in the RPS configuration has been changed and is not the default one. If this option is not specified, then the default `"rps"` is used. # `init(callback)` -This method will attempt to initialize the `mpinjs` instance according the provided options and retrieve users from the storage. It makes a request to retrieve the _Client Settings_ from the server. If the method succeeds, it will return the retrieved client settings as the `data` in the callback function. +This method will attempt to initialize the `mpinjs` instance according the provided options and retrieve users from the storage. +It makes a request to retrieve the _Client Settings_ from the server. +If the method succeeds, it will return the retrieved client settings as the `data` in the callback function. User management API # `makeNewUser(userId, deviceId)` -This method will create a new user object in the internal user storage. The new user will be initialized with the _state_ `"INVALID"`. The received parameters are: -* `userId` - _Mandatory_, String - The identity of the new user. It should be unique for the given server / application. The user object could later on be referred to using this user identity. -* `deviceId` - _Optional_, String - Some description of the local device. This Device ID is passed to the RPA, which might store it and use it later to determine which M-Pin ID is associated with this device. +This method will create a new user object in the internal user storage. +The new user will be initialized with the _state_ `"INVALID"`. +The received parameters are: +* `userId` - _Mandatory_, String - The identity of the new user. It should be a unique for the given server / applicatio