Ping SDKs

Step 2. Configure connection properties


In this step, you configure the "kotlin-ui-prototype" sample to connect to your server.

  1. In Android Studio, open the sdk-sample-apps/android/kotlin-ui-prototype folder you cloned in the previous step.

  2. In the Project pane, switch to the Android view.

  3. In the Android view, navigate to app > kotlin+java > com.example.app > env, and open EnvViewModel.kt.

    This file has the server environments the sample app uses. Each specifies the properties using the FROptionsBuilder.build method.

  4. Update the PingAM or PingAdvancedIdentityCloud example configuration values to match your server environment:

    url

    The URL of the server to connect to, including the deployment path of the Access Management component.

    Identity Cloud example:

    https://openam-forgerock-sdks.forgeblocks.com/am

    Self-hosted example:

    https://openam.example.com:8443/openam

    cookieName

    The name of the cookie that contains the session token.

    For example, with a self-hosted PingAM server this value might be iPlanetDirectoryPro.

    PingOne Advanced Identity Cloud tenants use a random alpha-numeric string.

    To locate the cookie name in an PingOne Advanced Identity Cloud tenant, navigate to Tenant settings > Global Settings, and copy the value of the Cookie property.

    realm

    The realm in which the OAuth 2.0 client profile and authentication journeys are configured.

    Usually, root for AM and alpha or bravo for Advanced Identity Cloud.

    oauthClientId

    The client ID of your OAuth 2.0 application in PingOne Advanced Identity Cloud or PingAM.

    For example, sdkPublicClient

    authServiceName

    The authentication tree or journey you created earlier.

    For example, sdkUsernamePasswordJourney

  5. Save your changes.

With the sample configured, you can proceed to Step 3. Test the app.