authenticate


Purpose

Performs authentication process to Pega 7.

When authentication is successful session cookies will be set.

Signature

authenticate( url, user, password, callbacks, force )

Returns

This method does not return anything.

Parameters

Name Description Type Use
url The base URL pointing to the Pega 7 servlet. string required
user The name of the user for authentication. string required
password The password of the user for authentication. string required
callbacks Passed to verify whether the Pega 7 authentication process was successful or not. undefined required
force This optional parameter clears the previous session (if there was one) before authentication. It's default value is "false". boolean optional

The authenticate method's callbacks object can be structured as follows:

{
  onSuccess: function( result ) {...},
  onFailure: function( {code, description} ) {...}
}

The table below lists all callbacks supported by the method.

Name Description Return type
onSuccess

Invoked when authentication process was successful.

The result object contains the url field that specifies the authenticated URL address of the Pega 7 application to be loaded into WebView.

The returned url in this callback can be used as the applicationURL for installation purposes.

undefined
onFailure

Invoked when the authentication process has failed for any reason.

Specifies the type of the last failure, as defined in the Constants section of the Authentication article. An error object contains the code and description fields, which describe the type of error in a human-readable form.

undefined

Related topics

Authentication
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...