@forgerock/protect 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
The Ping Protect module provides an API for interacting with the PingOne Signals (Protect) SDK to perform risk evaluations. It can be used with either a PingOne AIC/PingAM authentication journey with Protect callbacks or with a PingOne DaVinci flow with Protect collectors.
|
|
4
4
|
|
|
5
|
-
**IMPORTANT NOTE**: This module is not yet published. For the current published Ping Protect package please visit https://github.com/ForgeRock/forgerock-javascript-sdk/tree/develop/packages/ping-protect
|
|
6
|
-
|
|
7
5
|
## Full API
|
|
8
6
|
|
|
9
7
|
```js
|
|
@@ -16,7 +14,7 @@ resumeBehavioralData();
|
|
|
16
14
|
|
|
17
15
|
## Quickstart with a PingOne AIC or PingAM Authentication Journey
|
|
18
16
|
|
|
19
|
-
The Ping Protect module is intended to be used along with the
|
|
17
|
+
The Ping Protect module is intended to be used along with the Journey client to provide the Protect feature.
|
|
20
18
|
|
|
21
19
|
### Requirements
|
|
22
20
|
|
|
@@ -24,7 +22,7 @@ The Ping Protect module is intended to be used along with the ForgeRock JavaScri
|
|
|
24
22
|
2. PingOne tenant with Protect enabled
|
|
25
23
|
3. A Ping Protect Service configured in AIC or AM
|
|
26
24
|
4. A journey/tree with the appropriate Protect Nodes
|
|
27
|
-
5. A client application with the `@forgerock/
|
|
25
|
+
5. A client application with the `@forgerock/journey-client` and `@forgerock/protect` modules installed
|
|
28
26
|
|
|
29
27
|
### Integrate into a Client Application
|
|
30
28
|
|
|
@@ -33,11 +31,11 @@ The Ping Protect module is intended to be used along with the ForgeRock JavaScri
|
|
|
33
31
|
Install both modules and their latest versions:
|
|
34
32
|
|
|
35
33
|
```sh
|
|
36
|
-
npm install @forgerock/
|
|
34
|
+
npm install @forgerock/journey-client @forgerock/protect
|
|
37
35
|
```
|
|
38
36
|
|
|
39
37
|
```sh
|
|
40
|
-
pnpm install @forgerock/
|
|
38
|
+
pnpm install @forgerock/journey-client @forgerock/protect
|
|
41
39
|
```
|
|
42
40
|
|
|
43
41
|
#### Initialization (Recommended)
|
|
@@ -72,10 +70,10 @@ if (step.getCallbacksOfType('PingOneProtectInitializeCallback')) {
|
|
|
72
70
|
|
|
73
71
|
#### Data collection
|
|
74
72
|
|
|
75
|
-
You then call the `
|
|
73
|
+
You then call the `next` method after initialization to move the user forward in the journey.
|
|
76
74
|
|
|
77
75
|
```js
|
|
78
|
-
|
|
76
|
+
journeyClient.next(step);
|
|
79
77
|
```
|
|
80
78
|
|
|
81
79
|
At some point in the journey, and as late as possible in order to collect as much data as you can, you will come across the `PingOneProtectEvaluationCallback`. This is when you call the `getData` method to package what's been collected for the server to evaluate.
|
|
@@ -94,12 +92,12 @@ Now that we have the data, set it on the callback in order to send it to the ser
|
|
|
94
92
|
```js
|
|
95
93
|
callback.setData(data);
|
|
96
94
|
|
|
97
|
-
|
|
95
|
+
journeyClient.next(step);
|
|
98
96
|
```
|
|
99
97
|
|
|
100
98
|
### Error Handling
|
|
101
99
|
|
|
102
|
-
The Protect API methods will return an error object if they fail. When you encounter an error during initialization or evaluation, set the error message on the callback using the `setClientError` method. Setting the message on the callback is how it gets sent to the server on the `
|
|
100
|
+
The Protect API methods will return an error object if they fail. When you encounter an error during initialization or evaluation, set the error message on the callback using the `setClientError` method. Setting the message on the callback is how it gets sent to the server on the `next` method call.
|
|
103
101
|
|
|
104
102
|
```js
|
|
105
103
|
if (step.getCallbacksOfType('PingOneProtectInitializeCallback')) {
|