ForgeRock SDKs

Configure your JavaScript app

This section covers how to configure the settings the ForgeRock JavaScript SDK uses within your application.

Configuration strings

You provide the configuration strings by editing the serverConfig object, a parameter of the forgerock.Config.set() function.

Property Description

serverConfig

An interface for configuring how the SDK contacts the AM instance. Contains baseUrl and timeout.

serverConfig {baseUrl}

The base URL of the AM instance to connect to, including port and deployment path. For example, https://openam.example.com:8443/openam.

serverConfig {timeout}

An optional timeout, in milliseconds, for each request that communicates with AM. For example, for 30 seconds specify 30000. Defaults to 5000 (5 seconds).

realmPath

The realm or realm path in which the tree is configured. The default is the top-level realm root.

tree

The name of the tree to use.

clientId

The client_id of the OAuth 2.0 client profile to use.

redirectUri

The redirect_uri as set in the OAuth 2.0 client profile.

scope

A space-separated list of scopes to request when performing an OAuth 2.0 authorization flow.

oauthThreshold

A threshold, in seconds, to refresh an OAuth 2.0 token before the access_token expires (defaults to 30 seconds).

Copyright © 2010-2022 ForgeRock, all rights reserved.