---
title: Step 2. Configure connection properties
description: Prepare
component: sdks
version: latest
page_id: sdks:oidc:tutorials/android/pingfed/02_configuring-sample-for-pingfed
canonical_url: https://docs.pingidentity.com/sdks/latest/oidc/tutorials/android/pingfed/02_configuring-sample-for-pingfed.html
revdate: Thu, 24 Apr 2025 14:44:20 +0100
keywords: ["OAuth 2.0", "OpenID Connect", "Tutorial", "Source Code", "Integration", "SDK", "Android"]
---

# Step 2. Configure connection properties

* [Prepare](00_before-you-begin.html)

* [Download](01_downloading-forgerocksdk.html)

* **Configure**

* [Run](03_running-sample-pingfed.html)

***

In this step, you configure the kotlin-central-login-oidc sample to connect to the OAuth 2.0 application you created in PingFederate, using OIDC login.

1. In Android Studio, open the `sdk-sample-apps/android/kotlin-central-login-oidc` project you cloned in the previous step.

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

   ![android studio android view en](../../../../_images/android-studio-android-view-en.png)Figure 1. Switching the project pane to Android view.

3. In the Android view, navigate to **app > kotlin+java > com.example.app**, and open `Config.kt`.

4. Edit the default values provided in the `PingConfig` class with the values from your PingFederate server:

   `PingConfig` class default values

   ```kotlin
   data class PingConfig(
       var discoveryEndpoint: String = "https://openam-sdks.forgeblocks.com/am/oauth2/realms/alpha/.well-known/openid-configuration",
       var oauthClientId: String = "AndroidTest",
       var oauthRedirectUri: String = "org.forgerock.demo:/oauth2redirect",
       var oauthSignOutRedirectUri: String = "",
       var cookieName: String = "5421aeddf91aa20",
       var oauthScope: String = "openid profile email address")
   )
   ```

   * *discoveryEndpoint*

     The `.well-known` endpoint of your PingFederate server.

     > **Collapse: How do I form my PingFederate .well-known URL?**
     >
     > To form the `.well-known` endpoint for a PingFederate server:
     >
     > 1. Log in to your PingFederate administration console.
     >
     > 2. Navigate to **System** [icon: angle-right, set=fa] **Server** [icon: angle-right, set=fa] **Protocol Settings**.
     >
     > 3. Make a note of the **Base URL** value.
     >
     >    For example, `https://pingfed.example.com`
     >
     >    |   |                                   |
     >    | - | --------------------------------- |
     >    |   | Do not use the admin console URL. |
     >
     > 4. Append `/.well-known/openid-configuration` after the base URL value to form the `.well-known` endpoint of your server.
     >
     >    For example, `https://pingfed.example.com/.well-known/openid-configuration`.
     >
     >    The SDK reads the OAuth 2.0 paths it requires from this endpoint.

     For example, `https://pingfed.example.com/.well-known/openid-configuration`

   * *oauthClientId*

     The client ID from your OAuth 2.0 application in PingFederate.

     For example, `sdkPublicClient`

   * *oauthRedirectUri*

     The **Redirect URIs** as configured in the OAuth 2.0 client profile.

     This value must exactly match a value configured in your OAuth 2.0 client.

     For example, `org.forgerock.demo://oauth2redirect`

   * *oauthSignOutRedirectUri*

     The **Front-Channel Logout URIs** as configured in the OAuth 2.0 client profile.

     This value must exactly match a value configured in your OAuth 2.0 client.

     For example, `org.forgerock.demo://oauth2redirect`

   * *cookieName*

     Set this property to an empty string. PingFederate servers do not require this setting.

   * *oauthScope*

     The scopes you added to your OAuth 2.0 application in PingFederate.

     For example, `openid profile email phone`

   The result resembles the following:

   `PingConfig` class example values

   ```kotlin
   data class PingConfig(
       var discoveryEndpoint: String = "https://pingfed.example.com/.well-known/openid-configuration",
       var oauthClientId: String = "sdkPublicClient",
       var oauthRedirectUri: String = "org.forgerock.demo://oauth2redirect",
       var oauthSignOutRedirectUri: String = "org.forgerock.demo://oauth2redirect",
       var cookieName: String = "",
       var oauthScope: String = "openid profile email phone"
   )
   ```

5. Save your changes.
