Step 2. Configure the Ping (ForgeRock) Login Widget for PingOne Protect
Integrating the Ping (ForgeRock) Login Widget with PingOne Protect enables you to perform risk evaluations during your customer’s journey.
Complete the following tasks to fully integrate with PingOne Protect:
Initialize data collection
You must initialize the PingOne Signals SDK so that it collects the data needed to evaluate risk.
The earlier you can initialize the PingOne Signals SDK, the more data it can collect to make a risk evaluation.
There are two options for initializing the PingOne Signals SDK in the Ping (ForgeRock) Login Widget:
-
The Ping (ForgeRock) Login Widget automatically initializes the PingOne Signals SDK on receipt of a
PingOneProtectInitializeCallbackcallback from a journey you have started. -
Manually initialize the PingOne Signals SDK, import the module and pass in any configuration parameters you need, as follows:
import Widget, { configuration, journey, protect } from '@forgerock/login-widget'; new Widget({ target: widgetEl }); // Start PingOne Protect Signals SDK await protect.start({ envId: 3072206d-c6ce-ch15-m0nd-f87e972c7cc3, behavioralDataCollection: true, consoleLogEnabled: true, });The PingOne Signals SDK supports a number of parameters which you can supply yourself, or are contained in the
PingOneProtectInitializeCallbackcallback.Show PingOne Signals SDK
startparametersParameter
Description
Android
iOS
JavaScript
envIDRequired. Your PingOne environment identifier.
deviceAttributesToIgnoreOptional. A list of device attributes to ignore when collecting device signals.
For example,
AUDIO_OUTPUT_DEVICESorIS_ACCEPT_COOKIES.isBehavioralDataCollectionbehavioralDataCollectionWhen
true, collect behavioral data.Default is
true.isConsoleLogEnabledconsoleLogEnabledWhen
true, output SDK log messages in the developer console.Default is
false.isLazyMetadatalazyMetadataWhen
true, calculate metadata on demand rather than automatically after callingstart.Default is
false.N/A
deviceKeyRsyncIntervalsNumber of days that device attestation can rely upon the device fallback key.
Default:
14N/A
disableHubWhen
true, the client stores device data in the browser’slocalStorageonly.When
falsethe client uses an iframe.Default is
false.N/A
disableTagsWhen
true, the client does not collect tag data.Tags are used to record the pages the user visited, forming a browsing history.
Default is
false.N/A
enableTrustWhen
true, tie the device payload to a non-extractable crypto key stored in the browser for content authenticity verification.Default is
false.N/A
externalIdentifiersOptional. A list of custom identifiers that are associated with the device entity in PingOne Protect.
N/A
hubUrlOptional. The iframe URL to use for cross-storage device IDs.
N/A
waitForWindowLoadWhen
true, initialize the SDK on theloadevent, instead of theDOMContentLoadedevent.Default is
true.
Return collected data for a risk evaluation
To perform risk evaluations, the PingOne server requires the captured data.
There are two options for returning data in the Ping (ForgeRock) Login Widget:
-
On receipt of a
PingOneProtectEvaluationCallbackcallback within a journey, the Ping (ForgeRock) Login Widget automatically returns the captured data. -
Use the
getData()method to manually return the captured data:import Widget, { configuration, journey, protect } from '@forgerock/login-widget'; new Widget({ target: widgetEl }); // Start PingOne Protect Signals SDK await protect.start({ envId: 3072206d-c6ce-ch15-m0nd-f87e972c7cc3, behavioralDataCollection: true, consoleLogEnabled: true, }); // Return gathered data to the server await protect.getData();
Pause and resume behavioral data capture
The PingOne Protect Signals SDK can capture behavioral data, such as how the user interacts with the app, to help when performing evaluations.
There are scenarios where you might want to pause the collection of behavioral data. For example, the user might not be interacting with the app, or you only want to use device attribute data to be considered when performing PingOne Protect evaluations. You can then resume behavioral data collection when required.
There are two options for pausing and resuming behavioral data capture in the Ping (ForgeRock) Login Widget:
-
The
PingOneProtectEvaluationCallbackcallback can include a flag to pause or resume behavioral capture, which the Ping (ForgeRock) Login Widget automatically responds to. -
Use the
pauseBehavioralData()andresumeBehavioralData()methods to manually pause or resume the capture of behavioral data:import Widget, { configuration, journey, protect } from '@forgerock/login-widget'; new Widget({ target: widgetEl }); // Start PingOne Protect Signals SDK await protect.start({ envId: 3072206d-c6ce-ch15-m0nd-f87e972c7cc3, behavioralDataCollection: true, consoleLogEnabled: true, }); // Return gathered data to the server await protect.getData(); // Pause behavioral data collection protect.pauseBehavioralData(); // Resume behavioral data collection protect.resumeBehavioralData();