Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cordova-plugin-mas-core

CAAPIM45Broadcom2.1.0

Cordova MAS Foundation Plugin

cordova, MAS, Broadcom, CA Technologies, ecosystem:cordova, cordova-ios, cordova-android

readme

Cordova-MAS-Foundation is the core Cordova framework for Layer7 Mobile API Gateway.


Features

The Cordova-MAS-Foundation framework has the following features:

  • User Authentication and Authorization
  • Customize Login Dialogs
  • Customized Login Mechanism Handling
  • Enterprise Browser
  • Fingerprint Sessions Lock
  • One-Time Password (OTP)
  • Proximity Login (QR Code)
  • Social Login
  • SSL Pinning with certificate, public key, or public key hash
  • Intermediate Certificate for enhanced security
  • Multipart Form Upload capability. Enables the SDK user to upload files.

Get Started

Follow our documentation to install Cordova and set up iOS and Android projects.


Generate Reference documents

The reference documents for the MAS modules are generated using the JSDoc markdown language. JSDoc reads the JS files with annotations in comments, and generates an HTML output. It considers the comments that start with /**.

To install JSDoc, follow the instructions on JSDoc website.

The Cordova reference documents are available at our techdocs.broadcom.com site.

Example: An annotated comment for validateOTP method is as follows:

 /**
  Validate the OTP.
  * @param {function} successHandler user defined success callback
  * @param {function} errorHandler user defined error callback
  * @param {string} otp user defined one-time password to verify
  */

Param – Specifies a parameter. {string} – Specifies the return type of the method. otp – Specifies the variable name. user defined one-time password to verify – Describes the method.

Compile the JSDoc reference document as follows:

jsdoc www/ -d jsdocs

where “www/” is the location of the js file, and “-d jsdocs” is the location where the generated reference documents are placed.

For more information about how to write and compile the JSDoc reference documents, see the JSDoc website.

How You Can Contribute

Contributions are welcome and much appreciated. To learn more, see the Contribution Guidelines.

Communication

  • Have general questions or need help?, use [Stack Overflow][StackOverflow]. (Tag 'massdk')
  • Find a bug?, open an issue with the steps to reproduce it.
  • Request a feature or have an idea?, open an issue.

License

Copyright (c) 2019 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.

changelog

Version 2.1.00

Bug fixes

  • None

New features

  • None

Deprecated methods

MASMultipartForm#addFiles(fileName,filePath,fileMimeType,fileFieldName,fileData){...}

is now deprecated to remove file path and to just use fileData for upload. Please use --

MASMultipartForm#addFiles(fileName,fileMimeType,fileFieldName,fileData){...}

Removed methods

  • None

Version 2.0.00

Bug fixes

  • None

New features

  • Decoupling the Proximity login feature in Cordova in accordance with Native iOS SDK [US587011]
  • Intermediate Certificate Pinning-Implementation Cordova-iOS [US600504]
  • iOS - Podspec entry instead of framework tag in plugin.xml [US604884]
  • Multipart Form data support (Usage: File Upload) [US605856]

Deprecated methods

  • None

Removed methods

  • None

Version 1.9.10

Bug fixes

  • None

New features

  • None

Deprecated methods

  • None

Removed methods

  • None

Version 1.9.00

Bug fixes

  • None

New features

  • The Mobile SDK now supports adding and viewing of Metadata for a registered Device [US528171]
  • The Mobile SDK now supports ID Token Validation for JWT signed with RS256 Algorithm [F74400]
  • Cordova API Reference Guide Enhanced to have more details [US547180]
  • Cordova plugin remove command now reverts the app to pre-add state [US552411]

Deprecated methods

  • None

Removed methods

  • None

Version 1.8.00

Bug fixes

  • The Response JSON in Cordova-Android fixed to return errorInfo node instead of errorMessageDetails.

New features

  • In previous releases, the Mobile SDK always enforced id_token validation during device registration and user authentication. This caused a "JWT invalid" failure if the id_token signing algorithm was not supported by the Mobile SDK. The Mobile SDK now provides the option to enable or disable id_token validation to handle unsupported id_token signing algorithms. [US532284]
  • The Mobile SDK now supports offline logout. Use the new logout call to delete or keep credentials upon error. [US520142]

Deprecated methods

MASPlugin.MASUser.currentUser(function(currentUser) {
    currentUser.logout(successHandler, errorHandler);
},function(error) {});

is now deprecated to support new feature. Please use --

MASPlugin.MASUser.currentUser(function(currentUser) {
    currentUser.logout(successHandler, errorHandler,force);
},function(error) {});

Removed methods

  • None

Version 1.7.10

Bug fixes

  • None

New features

  • API to register Authentication Listener/Login Block to Cordova Plugin. [US510676]
    • MAS.setAuthCallbackHandler(authHandler)
    • MAS.removeAuthCallbackHandler()

Deprecated methods

  • None

Removed methods

  • None

Version 1.7

Bug fixes

  • None

New features

  • Business logic for login moved over to the developers. [US469657]
  • Config file preference to specify the iOS deployment target.
  • CocoaPods integration with framework podspec for iOS 'MASFoundation' framework.

Deprecated methods

  • None

Removed methods

  • getAuthCredentialsType has been removed.

Version 1.6.10

Bug fixes

  • None

New features

  • None

Deprecated methods

  • None

Version 1.6

Bug fixes

  • None

New features

  • Set security configuration to access public server APIs.
  • Start SDK with msso_config.json from a URL.
  • Sign claims with keys to generate JWT token.
  • Login with authorization credentials with username/password, JWT token and auth code.

Deprecated methods

  • None.

Version 1.5

Bug fixes

  • None

New features

  • Exposed API to get accessToken in MASPluginUser.
  • Exposed API for loginWithIdToken in MASPluginUser.
  • Now available as npm package "cordova-plugin-mas-core".

Deprecated methods

  • None.

Version 1.4

Bug fixes

  • An Enterprise browser webapp on back button press will now go back to Enterprise Browser base view (Android only). [DE273428]
  • On cancelling the SSL error verify dialog screen goes blank. Fixed to move back to EB window (Android only). [DE273690]
  • Improved Error handling and Error message standardized.

New features

  • Social Login Support in Cordova [US236694,US236697]
  • Refactoring the code - New plugins to handle different flow i.e. Device, Application, User and MAS APIs [US298706]
  • Provided MASUI support for new Login and OTP screens, to be in sync with native SDK (Android only). [US298706]
  • MASUser APIs made instance specific. This would now require an instance of MASUser to be created to access its state variable.[US298706]
  • Change in Javascript files and index to call different native Cordova Plugins as per the flow.[US298706]
  • Added Reference Documentation for Cordova APIs [US304202]

Deprecated methods

  • None.

Version 1.3.00

Bug fixes

  • NA

New features

  • Initial Release for MAS Foundation.

Deprecated methods

  • NA