UNPKG

ca-mas-foundation-cordova

Version:
4,035 lines (959 loc) 115 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2></h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="active"><span class="type-signature"></span>active<span class="type-signature"> :bool</span></h4> <div class="description"> Checks if the user is active </div> <h5>Type:</h5> <ul> <li> <span class="param-type">bool</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line73">line 73</a> </li></ul></dd> </dl> <h4 class="name" id="addresses"><span class="type-signature"></span>addresses<span class="type-signature"> :array</span></h4> <div class="description"> Lists of the addresses of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">array</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line55">line 55</a> </li></ul></dd> </dl> <h4 class="name" id="emailAddresses"><span class="type-signature"></span>emailAddresses<span class="type-signature"> :array</span></h4> <div class="description"> Lists of the email addresses of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">array</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line43">line 43</a> </li></ul></dd> </dl> <h4 class="name" id="familyName"><span class="type-signature"></span>familyName<span class="type-signature"> :string</span></h4> <div class="description"> The family name of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line25">line 25</a> </li></ul></dd> </dl> <h4 class="name" id="formattedName"><span class="type-signature"></span>formattedName<span class="type-signature"> :string</span></h4> <div class="description"> The formatted name of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line37">line 37</a> </li></ul></dd> </dl> <h4 class="name" id="givenName"><span class="type-signature"></span>givenName<span class="type-signature"> :string</span></h4> <div class="description"> The given name of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line31">line 31</a> </li></ul></dd> </dl> <h4 class="name" id="groupName"><span class="type-signature"></span>groupName<span class="type-signature"> :string</span></h4> <div class="description"> The name of the group </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginGroup.js.html">MASPluginGroup.js</a>, <a href="MASPluginGroup.js.html#line19">line 19</a> </li></ul></dd> </dl> <h4 class="name" id="groups"><span class="type-signature"></span>groups<span class="type-signature"> :array</span></h4> <div class="description"> List of the groups the user is a part of </div> <h5>Type:</h5> <ul> <li> <span class="param-type">array</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line67">line 67</a> </li></ul></dd> </dl> <h4 class="name" id="members"><span class="type-signature"></span>members<span class="type-signature"> :array</span></h4> <div class="description"> Lists the members of the group </div> <h5>Type:</h5> <ul> <li> <span class="param-type">array</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginGroup.js.html">MASPluginGroup.js</a>, <a href="MASPluginGroup.js.html#line31">line 31</a> </li></ul></dd> </dl> <h4 class="name" id="owner"><span class="type-signature"></span>owner<span class="type-signature"> :string</span></h4> <div class="description"> The owner of the group </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginGroup.js.html">MASPluginGroup.js</a>, <a href="MASPluginGroup.js.html#line25">line 25</a> </li></ul></dd> </dl> <h4 class="name" id="phoneNumbers"><span class="type-signature"></span>phoneNumbers<span class="type-signature"> :array</span></h4> <div class="description"> Lists of the phone numbers of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">array</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line49">line 49</a> </li></ul></dd> </dl> <h4 class="name" id="photos"><span class="type-signature"></span>photos<span class="type-signature"> :string</span></h4> <div class="description"> Returns the base64 string of the user's photo </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line61">line 61</a> </li></ul></dd> </dl> <h4 class="name" id="userName"><span class="type-signature"></span>userName<span class="type-signature"> :string</span></h4> <div class="description"> The username of the user </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginUser.js.html">MASPluginUser.js</a>, <a href="MASPluginUser.js.html#line19">line 19</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="authenticationStatus"><span class="type-signature"></span>authenticationStatus<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Returns the authentication status of the application </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginApplication.js.html">MASPluginApplication.js</a>, <a href="MASPluginApplication.js.html#line53">line 53</a> </li></ul></dd> </dl> <h4 class="name" id="authorize"><span class="type-signature"></span>authorize<span class="signature">(successHandler, errorHandler, code)</span><span class="type-signature"></span></h4> <div class="description"> Authorizes with a QR code </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>code</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">code extracted by the QR code scanner</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line617">line 617</a> </li></ul></dd> </dl> <h4 class="name" id="cancelAuthentication"><span class="type-signature"></span>cancelAuthentication<span class="signature">(successHandler, errorHandler, args)</span><span class="type-signature"></span></h4> <div class="description"> Cancels the current user's authentication session validation. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>args</code></td> <td class="type"> </td> <td class="description last">user defined variable which is request ID in Android. It is not used in iOS</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line321">line 321</a> </li></ul></dd> </dl> <h4 class="name" id="cancelGenerateAndSendOTP"><span class="type-signature"></span>cancelGenerateAndSendOTP<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Cancels the current user's generating and sending OTP call. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line423">line 423</a> </li></ul></dd> </dl> <h4 class="name" id="cancelOTPValidation"><span class="type-signature"></span>cancelOTPValidation<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Cancels the authentication validation session of the user </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line464">line 464</a> </li></ul></dd> </dl> <h4 class="name" id="closePopup"><span class="type-signature"></span>closePopup<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Closes an existing popup. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line630">line 630</a> </li></ul></dd> </dl> <h4 class="name" id="completeAuthentication"><span class="type-signature"></span>completeAuthentication<span class="signature">(successHandler, errorHandler, username, password)</span><span class="type-signature"></span></h4> <div class="description"> Completes the current user's authentication session validation. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>username</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">user defined username</td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">user defined password</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line226">line 226</a> </li></ul></dd> </dl> <h4 class="name" id="configFileName"><span class="type-signature"></span>configFileName<span class="signature">(successHandler, errorHandler, fileName)</span><span class="type-signature"></span></h4> <div class="description"> Sets the name of the configuration file. This gives the ability to set the file's name to a custom value. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>fileName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line165">line 165</a> </li></ul></dd> </dl> <h4 class="name" id="deleteFromPath"><span class="type-signature"></span>deleteFromPath<span class="signature">(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)</span><span class="type-signature"></span></h4> <div class="description"> Calls the HTTP DELTE method from the Gateway. It requires at least three mandatory parameters as shown in the below example. The requestType and responseType are the optional parameters. If the requestType and responseType are not present, then it is set to the default JSON type. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">URL path</td> </tr> <tr> <td class="name"><code>parametersInfo</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">parameters to be passed along with the request</td> </tr> <tr> <td class="name"><code>headersInfo</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">headers of the request</td> </tr> <tr> <td class="name"><code>requestType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">specifies the request type of the request</td> </tr> <tr> <td class="name"><code>responseType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">specifies the response type of the request</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line570">line 570</a> </li></ul></dd> </dl> <h4 class="name" id="deregister"><span class="type-signature"></span>deregister<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Deregisters a device from MAG server i.e. remove all registration information of this device from server </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginDevice.js.html">MASPluginDevice.js</a>, <a href="MASPluginDevice.js.html#line55">line 55</a> </li></ul></dd> </dl> <h4 class="name" id="gatewayIsReachable"><span class="type-signature"></span>gatewayIsReachable<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Checks whether the Gateway is reachable </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line534">line 534</a> </li></ul></dd> </dl> <h4 class="name" id="generateAndSendOTP"><span class="type-signature"></span>generateAndSendOTP<span class="signature">(successHandler, errorHandler, channels)</span><span class="type-signature"></span></h4> <div class="description"> Requests server to generate and send OTP to the channels provided. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>channels</code></td> <td class="type"> <span class="param-type">array</span> </td> <td class="description last">user defined variable which is an array of channels where the OTP is to be delivered.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line361">line 361</a> </li></ul></dd> </dl> <h4 class="name" id="getCurrentDevice"><span class="type-signature"></span>getCurrentDevice<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Fetches the device registration state and identifier as JSON string </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginDevice.js.html">MASPluginDevice.js</a>, <a href="MASPluginDevice.js.html#line45">line 45</a> </li></ul></dd> </dl> <h4 class="name" id="getCurrentProviders"><span class="type-signature"></span>getCurrentProviders<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Returns a list of available providers </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginAuthProviders.js.html">MASPluginAuthProviders.js</a>, <a href="MASPluginAuthProviders.js.html#line15">line 15</a> </li></ul></dd> </dl> <h4 class="name" id="getDeviceIdentifier"><span class="type-signature"></span>getDeviceIdentifier<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Fetches the device identifier registered in MAG server </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginDevice.js.html">MASPluginDevice.js</a>, <a href="MASPluginDevice.js.html#line30">line 30</a> </li></ul></dd> </dl> <h4 class="name" id="getFromPath"><span class="type-signature"></span>getFromPath<span class="signature">(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)</span><span class="type-signature"></span></h4> <div class="description"> Calls the HTTP GET method from the gateway. This requires at least three mandatory parameters as shown in the below example. The requestType and responseType are the optional parameters. If the requestType and responseType are not present, then it is set to the default JSON type. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">URL path</td> </tr> <tr> <td class="name"><code>parametersInfo</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">parameters to be passed along with the request</td> </tr> <tr> <td class="name"><code>headersInfo</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">headers of the request</td> </tr> <tr> <td class="name"><code>requestType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">specifies the request type of the request</td> </tr> <tr> <td class="name"><code>responseType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">specifies the response type of the request</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line554">line 554</a> </li></ul></dd> </dl> <h4 class="name" id="grantFlow"><span class="type-signature"></span>grantFlow<span class="signature">(successHandler, errorHandler, MASGrantFlow)</span><span class="type-signature"></span></h4> <div class="description"> Sets the device registration type as MASDeviceRegistrationType. This should be set before MAS start is called </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined success callback</td> </tr> <tr> <td class="name"><code>errorHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">user defined error callback</td> </tr> <tr> <td class="name"><code>MASGrantFlow</code></td> <td class="type"> <span class="param-type">MASGrantFlow</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="MASPluginMAS.js.html">MASPluginMAS.js</a>, <a href="MASPluginMAS.js.html#line209">line 209</a> </li></ul></dd> </dl> <h4 class="name" id="initEnterpriseBrowser"><span class="type-signature"></span>initEnterpriseBrowser<span class="signature">(successHandler, errorHandler)</span><span class="type-signature"></span></h4> <div class="description"> Initializes the Enterprise Browser window and populates it with the native and web apps registered in the MAG server </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>successHandler</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="descri