Step 2. Configure connection strings
In this step, you provide your application with the settings it needs to connect to your PingOne Advanced Identity Cloud or PingAM instance.
For example, which authentication tree to use and the realm it is a part of.
For this quick start guide, you must provide at least the following properties:
Property | Description |
---|---|
|
The |
|
The This value must match a value configured in your OAuth 2.0 client, but is not actually used by the Android application. |
|
A list of scopes to request when performing an OAuth 2.0 authorization flow. |
|
The URL of the PingOne Advanced Identity Cloud or PingAM instance. For example, If you are not using PingOne Advanced Identity Cloud, specify the port and deployment path. For example, |
|
The realm in which the OAuth 2.0 client profile is configured. For example, If you are not using PingOne Advanced Identity Cloud, specify the default PingAM the top-level realm; |
|
The name of the journey to use for authentication. For example, |
|
The name of the cookie that contains the session token. To obtain the name of the cookie in the PingOne Advanced Identity Cloud:
The value is a random string of characters, such as If you are not using PingOne Advanced Identity Cloud, the cookie name is usually |
Show additional configuration properties
Property | Description |
---|---|
|
A threshold, in seconds, to refresh an OAuth 2.0 token before the |
|
A timeout, in seconds, for each request that communicates with PingAM. |
Add required connection settings to your app
-
In the Project tree view of your Android Studio project, navigate to , and then open the
strings.xml
file. -
Inside the
<resources>
element, add the following elements, adjusting the values for your deployment:<!-- OAuth 2.0 client details --> <string name="forgerock_oauth_client_id" translatable="false">sdkPublicClient</string> <string name="forgerock_oauth_redirect_uri" translatable="false">https://sdkapp.example.com:8443/callback</string> <string name="forgerock_oauth_scope" translatable="false">openid profile email address</string> <!-- PingOne Advanced Identity Cloud details --> <string name="forgerock_url" translatable="false">https://openam-forgerock-sdks.forgeblocks.com/am</string> <string name="forgerock_cookie_name" translatable="false">iPlanetDirectoryPro</string> <string name="forgerock_realm" translatable="false">alpha</string> <!-- Journey details --> <string name="forgerock_auth_service" translatable="false">sdkUsernamePasswordJourney</string>