For more information about the authentication API, see Authentication API in the PingFederate documentation.

There are two device profiling scripts to choose from, including the "SDK" and "Web" scripts. For a description of the differences, see Introduction to Profiling in the ThreatMetrix documentation.

  1. If you want to use the ThreatMetrix SDK script, do the following:
    1. Copy the tmx_sdk_profiling.js file from the integration .zip archive to a location that your web application page can access.
    2. Add the following code to the sign-on page.
      <script type="text/javascript" src="tmx_sdk_profiling.js"></script>
      <script type="text/javascript">pinghelper.run_sid_provided("https://h-api.online-metrix.net", "<orgId>", "<sessionId>");</script>

      Substitute your organization ID and adjust the path to the script file.

      If you requested a custom device profiling domain in Configuring ThreatMetrix, substitute it here.

      For each sign-on event, insert the session ID provided by PingFederate.

  2. If you want to use the ThreatMetrix Web script, add the following code to the sign-on page.
    <script type="text/javascript"
    src="https://h-api.online-metrix.net/fp/tags.js?org_id=<orgId>&session_id=<sessionId>"></script>

    Substitute your organization ID.

    If you requested a custom device profiling domain in Configuring ThreatMetrix, substitute it here.

    For each sign-on event, insert the session ID from PingFederate.

  3. Configure your application to complete the following actions in sequence:
    1. Get the session ID from PingFederate. This is an attribute of the DEVICE_PROFILE_REQUIRED state.
    2. Run the device profiling script with the session ID.
    3. POST continueAuthentication to the authentication API.
  4. When you complete the steps in Configuring an adapter instance, set Device Profiling to Create new device profile.