Verifying a one-time password by calling an activity
You can verify a one-time password by calling an activity. Use this method to verify a one-time password in an application that is running on Pega Platform version 7.3 or later.
- Create an activity.
For more information about how to create an activity, see Creating an activity.
- On the Pages & Classes tab of the
Activity form, define the page that passes the
parameters to the pxVerifyOTP activity and an OperatorID page
to access the Operator instance.
- In the Page name field, enter the name of the page that passes parameters to the activity.
- In the Class field, enter Embed-OTPInputs.
- Click the Plus icon to add a new parameter.
- In the Page name field, enter OperatorID.
- In the Class field, enter Data-Admin-Operator-ID.
- On the Steps tab, in the first step, create a
page.
- In the Method list, press the Down Arrow key, and select Page-New.
- In the Step page field, enter the name of the previously defined page that passes the parameters.
- Add a second step to the activity to configure the page properties
- In the Method field, click the Down Arrow key, and select Property-Set.
- In the Step page field, enter the name of the page that passes parameters to the activity.
- Click the Expand icon, and then provide the
following name-value pairs in the PropertiesName
and PropertiesValue fields:
pyReferenceID — Enter the Reference ID returned by the pxSendOTP activity when it generated the one-time password.
pyOTPValue — Enter the one-time password value entered by the user.
- Add a third step to the activity that calls the
pxVerifyOTP activity.
- In the Method field, enter Call pxVerifyOTP.
- In the Step page field, enter OperatorID.
- Add a fourth step to the activity that reads the Reference ID.
- In the Method field, click the Down Arrow key, and select Property-Set.
- In the Step page field,enter the name of the OTPInputs page.
- Click the Expand icon, and then provide the
following name-value pairs in the PropertiesName
and PropertiesValue fields:
PropertiesName field — Enter Primary.OTPStatus.
PropertiesValue field — Enter .pyOTPStatus.
- Click the Add item icon to add another
parameter, and then provide the following name-value pairs in the
PropertiesName and
PropertiesValue fields:
PropertiesName field — Enter Primary.OTPStatusMessage.
PropertiesValue field — Enter .pyOTPStatusMessage.
- Click Save.
Previous topic Verifying a one-time password Next topic Verifying a one-time password by calling an API