UNPKG

ca-mas-foundation-cordova

Version:
122 lines (87 loc) 7.97 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: MASPluginDevice.js</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">Source: MASPluginDevice.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>/* * Copyright (c) 2016 CA, Inc. All rights reserved. * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. * */ var MASPluginDevice = function() { ///------------------------------------------------------------------------------------------------------------------ /// @name Properties ///------------------------------------------------------------------------------------------------------------------ /** * Boolean state of device registration status on MAG server * @param {function} successHandler user defined success callback * @param {function} errorHandler user defined error callback */ this.isDeviceRegistered = function(successHandler, errorHandler) { return Cordova.exec(successHandler, errorHandler, "MASPluginDevice", "isDeviceRegistered", []); }; /** * Fetches the device identifier registered in MAG server * @param {function} successHandler user defined success callback * @param {function} errorHandler user defined error callback */ this.getDeviceIdentifier = function(successHandler, errorHandler) { return Cordova.exec(successHandler, errorHandler, "MASPluginDevice", "getDeviceIdentifier", []); }; ///------------------------------------------------------------------------------------------------------------------ /// @name Current Device ///------------------------------------------------------------------------------------------------------------------ /** * Fetches the device registration state and identifier as JSON string * @param {function} successHandler user defined success callback * @param {function} errorHandler user defined error callback */ this.getCurrentDevice = function(successHandler, errorHandler) { return Cordova.exec(successHandler, errorHandler, "MASPluginDevice", "getCurrentDevice", []); }; /** * Deregisters a device from MAG server i.e. remove all registration information of this device from server * @param {function} successHandler user defined success callback * @param {function} errorHandler user defined error callback */ this.deregister = function(successHandler, errorHandler) { return Cordova.exec(successHandler, errorHandler, "MASPluginDevice", "deregister", []); }; /** * Resets all the local cache of the device for the app i.e. all tokens, credentials, states are flushed * @param {function} successHandler user defined success callback * @param {function} errorHandler user defined error callback */ this.resetLocally = function(successHandler, errorHandler) { return Cordova.exec(successHandler, errorHandler, "MASPluginDevice", "resetLocally", []); }; } module.exports = MASPluginDevice;</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#active">active</a></li><li><a href="global.html#addresses">addresses</a></li><li><a href="global.html#authenticationStatus">authenticationStatus</a></li><li><a href="global.html#authorize">authorize</a></li><li><a href="global.html#cancelAuthentication">cancelAuthentication</a></li><li><a href="global.html#cancelGenerateAndSendOTP">cancelGenerateAndSendOTP</a></li><li><a href="global.html#cancelOTPValidation">cancelOTPValidation</a></li><li><a href="global.html#closePopup">closePopup</a></li><li><a href="global.html#completeAuthentication">completeAuthentication</a></li><li><a href="global.html#configFileName">configFileName</a></li><li><a href="global.html#deleteFromPath">deleteFromPath</a></li><li><a href="global.html#deregister">deregister</a></li><li><a href="global.html#emailAddresses">emailAddresses</a></li><li><a href="global.html#familyName">familyName</a></li><li><a href="global.html#formattedName">formattedName</a></li><li><a href="global.html#gatewayIsReachable">gatewayIsReachable</a></li><li><a href="global.html#generateAndSendOTP">generateAndSendOTP</a></li><li><a href="global.html#getCurrentDevice">getCurrentDevice</a></li><li><a href="global.html#getCurrentProviders">getCurrentProviders</a></li><li><a href="global.html#getDeviceIdentifier">getDeviceIdentifier</a></li><li><a href="global.html#getFromPath">getFromPath</a></li><li><a href="global.html#givenName">givenName</a></li><li><a href="global.html#grantFlow">grantFlow</a></li><li><a href="global.html#groupName">groupName</a></li><li><a href="global.html#groups">groups</a></li><li><a href="global.html#initEnterpriseBrowser">initEnterpriseBrowser</a></li><li><a href="global.html#initialize">initialize</a></li><li><a href="global.html#initWithInfo">initWithInfo</a></li><li><a href="global.html#isApplicationAuthenticated">isApplicationAuthenticated</a></li><li><a href="global.html#isAuthenticated">isAuthenticated</a></li><li><a href="global.html#isCurrentUser">isCurrentUser</a></li><li><a href="global.html#isDeviceRegistered">isDeviceRegistered</a></li><li><a href="global.html#isSessionLocked">isSessionLocked</a></li><li><a href="global.html#launchApp">launchApp</a></li><li><a href="global.html#lockSession">lockSession</a></li><li><a href="global.html#logout">logout</a></li><li><a href="global.html#members">members</a></li><li><a href="global.html#newGroup">newGroup</a></li><li><a href="global.html#owner">owner</a></li><li><a href="global.html#phoneNumbers">phoneNumbers</a></li><li><a href="global.html#photos">photos</a></li><li><a href="global.html#postToPath">postToPath</a></li><li><a href="global.html#putToPath">putToPath</a></li><li><a href="global.html#removeSessionLock">removeSessionLock</a></li><li><a href="global.html#resetLocally">resetLocally</a></li><li><a href="global.html#retrieveAuthenticationProviderForProximityLogin">retrieveAuthenticationProviderForProximityLogin</a></li><li><a href="global.html#retrieveEnterpriseApps">retrieveEnterpriseApps</a></li><li><a href="global.html#setCustomLoginPage">setCustomLoginPage</a></li><li><a href="global.html#setCustomOTPChannelsPage">setCustomOTPChannelsPage</a></li><li><a href="global.html#setCustomOTPPage">setCustomOTPPage</a></li><li><a href="global.html#start">start</a></li><li><a href="global.html#startWithDefaultConfiguration">startWithDefaultConfiguration</a></li><li><a href="global.html#startWithJSON">startWithJSON</a></li><li><a href="global.html#stop">stop</a></li><li><a href="global.html#unlockSession">unlockSession</a></li><li><a href="global.html#unlockSessionWithMessage">unlockSessionWithMessage</a></li><li><a href="global.html#useNativeMASUI">useNativeMASUI</a></li><li><a href="global.html#userName">userName</a></li><li><a href="global.html#validateOTP">validateOTP</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.0-dev</a> on Mon Mar 06 2017 16:30:10 GMT+0530 (IST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>