PingIDM 7.5.0

Test the custom stage

Stages are implemented as part of a self-service process. To test your custom stage, you need to add it to a self-service process. You can create a new process, or use one of the default processes available through the admin UI.

In this example, we add the custom stage to the User Registration process and test it as part of self-registration, as follows:

  1. From the navigation bar, click Configure > User Registration, and activate Enable User Registration.

    IDM creates a selfservice-registration.json file in your project’s conf directory. There are a number of stages in that process by default; for example, the parameters stage:

    "stageConfigs" : [
        {
            "name" : "parameters",
            "parameterNames" : [
                "returnParams"
            ]
        },
    ...
    ]
  2. Add your custom stage to the process by creating a configuration item in the stageConfigs array:

    "stageConfigs" : [
        {
            "name" : "parameters",
            "parameterNames" : [
                "returnParams"
            ]
        },
        {
        "class" : "org.forgerock.selfservice.custom.MathProblemStageConfig",
        "leftValue" : 12,
        "rightValue" : 4
        },
    ...
    ]
    Self-service stages can generally not be configured in random order. For example, some stages require input from the process state that has been populated by a preceding stage. For the purposes of this example, add the MathProblem stage directly after the parameters stage.
  3. Disable all-in-one registration.

    By default, the registration phase has all-in-one registration enabled. All-in-one registration covers a number of registration stages. For the purposes of testing the custom stage, disable all-in-one registration by setting "allInOneRegistration" : false in selfservice-registration.json. For more information, refer to All-in-one registration.

  4. Save the changes to the selfservice-registration.json file.

    IDM reloads the configuration automatically—you do not need to restart the server.

  5. Log in to the End User UI (https://localhost:8443 by default), and click Register.

    IDM displays the Math Problem you configured previously.

Copyright © 2010-2024 ForgeRock, all rights reserved.