Members

active :bool

Checks if the user is active
Type:
  • bool
Source:

addresses :array

Lists of the addresses of the user
Type:
  • array
Source:

emailAddresses :array

Lists of the email addresses of the user
Type:
  • array
Source:

familyName :string

The family name of the user
Type:
  • string
Source:

formattedName :string

The formatted name of the user
Type:
  • string
Source:

givenName :string

The given name of the user
Type:
  • string
Source:

groupName :string

The name of the group
Type:
  • string
Source:

groups :array

List of the groups the user is a part of
Type:
  • array
Source:

members :array

Lists the members of the group
Type:
  • array
Source:

owner :string

The owner of the group
Type:
  • string
Source:

phoneNumbers :array

Lists of the phone numbers of the user
Type:
  • array
Source:

photos :string

Returns the base64 string of the user's photo
Type:
  • string
Source:

userName :string

The username of the user
Type:
  • string
Source:

Methods

authenticationStatus(successHandler, errorHandler)

Returns the authentication status of the application
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

authorize(successHandler, errorHandler, code)

Authorizes with a QR code
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
code string code extracted by the QR code scanner
Source:

cancelAuthentication(successHandler, errorHandler, args)

Cancels the current user's authentication session validation.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
args user defined variable which is request ID in Android. It is not used in iOS
Source:

cancelGenerateAndSendOTP(successHandler, errorHandler)

Cancels the current user's generating and sending OTP call.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

cancelOTPValidation(successHandler, errorHandler)

Cancels the authentication validation session of the user
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

closePopup()

Closes an existing popup.
Source:

completeAuthentication(successHandler, errorHandler, username, password)

Completes the current user's authentication session validation.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
username string user defined username
password string user defined password
Source:

configFileName(successHandler, errorHandler, fileName)

Sets the name of the configuration file. This gives the ability to set the file's name to a custom value.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
fileName string
Source:

deleteFromPath(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)

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.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
path string URL path
parametersInfo string parameters to be passed along with the request
headersInfo string headers of the request
requestType string specifies the request type of the request
responseType string specifies the response type of the request
Source:

deregister(successHandler, errorHandler)

Deregisters a device from MAG server i.e. remove all registration information of this device from server
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

gatewayIsReachable(successHandler, errorHandler)

Checks whether the Gateway is reachable
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

generateAndSendOTP(successHandler, errorHandler, channels)

Requests server to generate and send OTP to the channels provided.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
channels array user defined variable which is an array of channels where the OTP is to be delivered.
Source:

getCurrentDevice(successHandler, errorHandler)

Fetches the device registration state and identifier as JSON string
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

getCurrentProviders(successHandler, errorHandler)

Returns a list of available providers
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

getDeviceIdentifier(successHandler, errorHandler)

Fetches the device identifier registered in MAG server
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

getFromPath(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)

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.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
path string URL path
parametersInfo string parameters to be passed along with the request
headersInfo string headers of the request
requestType string specifies the request type of the request
responseType string specifies the response type of the request
Source:

grantFlow(successHandler, errorHandler, MASGrantFlow)

Sets the device registration type as MASDeviceRegistrationType. This should be set before MAS start is called
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
MASGrantFlow MASGrantFlow
Source:

initEnterpriseBrowser(successHandler, errorHandler)

Initializes the Enterprise Browser window and populates it with the native and web apps registered in the MAG server
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

initialize(successHandler, errorHandler)

Initializes the MAS plugin. This includes setting of the various listeners required for authenticating the user while registration of the application with the Gateway and accessing various protected API. Any further initialization related setting will go here
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

initWithInfo(successHandler, errorHandler, info)

Creates a new group with the specified information
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
info dictionary
Source:

isApplicationAuthenticated(successHandler, errorHandler)

Checks if application is authenticated
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

isAuthenticated(successHandler, errorHandler)

Boolean indicator that specifies whether the MASPluginUser object is authenticated
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

isCurrentUser(successHandler, errorHandler)

Boolean indicator that specifies whether the MASPluginUser object is the current user.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

isDeviceRegistered(successHandler, errorHandler)

Boolean state of device registration status on MAG server
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

isSessionLocked(successHandler, errorHandler)

Boolean indicator that specifies whether the currently authenticated MASPluginUser object is locked
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

launchApp(successHandler, errorHandler, appId)

Launches the selected enterprise App
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
appId string app ID of the app that needs to be launched
Source:

lockSession(successHandler, errorHandler)

Locks the current session
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

logout()

Logs off the user.
Source:

newGroup(successHandler, errorHandler)

Creates a new group
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

postToPath(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)

postToPath does the HTTP POST call from the gateway. This expects atleast three mandatry parameters as shown in the the below example. The requestType and responseType are the optional parameters. If the requestType and responseType is not present then it is set to the Default Type to JSON.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
path string path to the url
parametersInfo string parameters to be passed along with the request
headersInfo string headers of the request
requestType string specifies the request type of the request
responseType string specifies the response type of the request
Source:

putToPath(successHandler, errorHandler, path, parametersInfo, headersInfo, requestType, responseType)

Calls the HTTP POST method from the Gateway. This expects 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
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
path string path to the url
parametersInfo string parameters to be passed along with the request
headersInfo string headers of the request
requestType string specifies the request type of the request
responseType string specifies the response type of the request
Source:

removeSessionLock(successHandler, errorHandler)

Removes the session lock
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

resetLocally(successHandler, errorHandler)

Resets all the local cache of the device for the app i.e. all tokens, credentials, states are flushed
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

retrieveAuthenticationProviderForProximityLogin(successHandler, errorHandler)

Returns the proximity login providers
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

retrieveEnterpriseApps(successHandler, errorHandler)

Retrieves all the enterprise apps in the form of JSON from the server. It includes both native and web apps
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

setCustomLoginPage(successHandler, errorHandler, customPage)

Sets the authentication UI handling page
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
customPage string user defined page if you want the plugin to use it. "mas-login.html" is the default page.
Source:

setCustomOTPChannelsPage(successHandler, errorHandler, customPage)

Sets the OTP Channels Selection UI handling page
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
customPage string user defined page if you want the plugin to use it. "mas-otpchannel.html" is the default page.
Source:

setCustomOTPPage(successHandler, errorHandler, customPage)

Sets the OTP UI handling page
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
customPage string user defined page if you want the plugin to use it. "mas-otp.html" is the default page.
Source:

start(successHandler, errorHandler)

Starts the lifecycle of the MAS processes. This includes the registration of the application on the Gateway, if the network is available.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

startWithDefaultConfiguration(successHandler, errorHandler, defaultConfiguration)

Starts the lifecycle of the MAS processes with a specified default configuration. This includes the registration of the application on the Gateway, if the network is available.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
defaultConfiguration array
Source:

startWithJSON(successHandler, errorHandler, jsonObject)

Starts the lifecycle of the MAS processes with a specified msso_config.json. This includes the registration of the application on the Gateway, if the network is available.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
jsonObject jsonObject
Source:

stop(successHandler, errorHandler)

Stops the lifecycle of all MAS processes.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

unlockSession(successHandler, errorHandler)

Unlocks the current session
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

unlockSessionWithMessage(successHandler, errorHandler, message)

Unlocks the current session with a message to the user
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
message string message to the user
Source:

useNativeMASUI(successHandler, errorHandler)

Use Native MASUI
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
Source:

validateOTP(successHandler, errorHandler, otp)

Validates the entered OTP.
Parameters:
Name Type Description
successHandler function user defined success callback
errorHandler function user defined error callback
otp string user defined one-time password that is to be verified
Source: