ForgeRock SDKs 3.3

Understand the authentication flow

You may need to implement a UI element for each Callback object and must handle each Node object. Although the callback classes are implemented in the forgerock-auth module, the forgerock-auth module itself cannot render those callbacks as UI elements.

To initiate the authentication flow, use the FRUser.login() method or the FRSession.authenticate() method. Both methods trigger the authentication process, based on the AM journey/tree you configured.

You implement a NodeListener to respond when AM returns a Node object. Until the authentication process completes, each Node object includes an array of callbacks that challenge the principal for evidence. Your application prompts the user to collect the evidence, as necessary.

The array of callbacks you present to the user in this example application includes a challenge for the username, and another for the password. Your application prompts for the username and password, and updates the callbacks with the values. The SDK submits the updated array of callbacks to the server.

The process continues until the authentication tree is complete.

For a list of callbacks that are implemented in the ForgeRock Android SDK, see the org.forgerock.android.auth.callback package in the API reference.

Upon completion, the NodeListener returns one of the following:

FRUser or FRSession

The abstract layer of the currently authenticated user session.

Node object to process

The Node object is a representation of a step in the authentication process that requires user interaction to provide input to each Callback in the Node.

Exception

If an error occurs during the authentication process.

Copyright © 2010-2022 ForgeRock, all rights reserved.