• Creates a journey client for AM authentication tree/journey interactions.

    Journey-client is designed specifically for ForgeRock Access Management (AM) servers. It uses AM-proprietary endpoints for callback-based authentication trees.

    Parameters

    Returns Promise<GenericError | JourneyClient>

    A journey client instance, or a GenericError if configuration fails

    // Basic usage - baseUrl and realmPath are inferred from wellknown
    const client = await journey({
    config: {
    serverConfig: {
    wellknown: 'https://am.example.com/am/oauth2/alpha/.well-known/openid-configuration',
    },
    },
    });

    // With explicit realmPath (when inference isn't desired)
    const client = await journey({
    config: {
    serverConfig: {
    wellknown: 'https://am.example.com/am/oauth2/alpha/.well-known/openid-configuration',
    },
    realmPath: 'alpha',
    },
    });