Configuring the DaVinci module
PingOne Android
Configure DaVinci module for Android properties to connect to PingOne and step through an associated DaVinci flow.
There are two methods for configuring the DaVinci module:
- Full configuration
-
Use the Kotlin builder DSL to access all available settings, including Android-specific options such as custom HTTP clients and storage configuration.
- Common JSON configuration
-
Use a shared key-value structure that works identically across Android, iOS, and JavaScript, letting you load a single config file across platforms.
Full configuration
The following shows an example DaVinci module configuration, using the underlying Oidc module:
import com.pingidentity.davinci.DaVinci
import com.pingidentity.davinci.module.Oidc
val davinciClient = DaVinci {
logger = Logger.STANDARD
module(Oidc) {
clientId = "6c7eb89a-66e9-ab12-cd34-eeaf795650b2"
discoveryEndpoint = "https://auth.pingone.com/3072206d-c6ce-ch15-m0nd-f87e972c7cc3/" +
"as/.well-known/openid-configuration"
scopes = mutableSetOf("openid", "profile", "email", "address", "revoke")
redirectUri = "com.example.demo://oauth2redirect"
par = true
additionalParameters = mapOf("customKey" to "customValue")
}
}
Common JSON configuration
You can provide the same configuration as a JSON object, which lets you share a single config file across Android, iOS, and JavaScript.
DaVinci module from a JSON objectval davinciClient = DaVinci(buildJsonObject {
put("timeout", 30000) // milliseconds
put("log", "WARN")
putJsonObject("oidc") {
put("clientId", "6c7eb89a-66e9-ab12-cd34-eeaf795650b2")
put("discoveryEndpoint",
"https://auth.pingone.com/3072206d-c6ce-ch15-m0nd-f87e972c7cc3/as/.well-known/openid-configuration")
putJsonArray("scopes") {
add("openid"); add("profile"); add("email"); add("revoke")
}
put("redirectUri", "com.example.demo://oauth2redirect")
}
}).getOrThrow()
Optionally, you can store this JSON in a file alongside your app and load it at runtime so the same file can be shared across platforms.
|
The JSON factory and the native If you need Android-specific settings such as |
Configuration property reference
The following properties are available when configuring the DaVinci module for Android.
The JSON property column shows the equivalent key when using JSON configuration.
| Property | JSON property | Description | Required? | ||
|---|---|---|---|---|---|
|
|
Specify which logger the Orchestration SDK should use to output messages. Select from the built-in presets You can also create and use your own logger implementation. Learn more in Customizing logging on Android. In JSON configuration, use the |
No |
||
|
|
A timeout, in seconds, for each request that communicates with the server. Default is When using JSON configuration, specify
|
No |
||
|
|
Request which flow the PingOne server uses by adding an Authentication Context Class Reference (ACR) parameter. Enter a single DaVinci policy by using its flow policy ID. Example:
|
No |
||
|
|
Add additional key-pair parameters as query strings to the initial OAuth 2.0 call to the For example,
|
No |
||
|
|
The For example, |
Yes |
||
|
|
Your PingOne server’s Example:
|
Yes |
||
|
|
Whether to use Pushed Authorization Requests (PAR) for communicating with the authorization server. Learn more in Securing OIDC sign-on with Pushed Authorization Requests. |
No |
||
|
|
The
For example, |
Yes |
||
|
|
A set of scopes to request when performing an OAuth 2.0 authorization flow. For example, |
Yes |
||
|
|
How the authorization server should display the authentication UI.
|
No |
||
|
|
A hint to pre-populate the username field on the authorization server’s sign-on page. For example, |
No |
||
|
|
A value to associate with the ID token to prevent replay attacks. If not set, the SDK generates a nonce automatically. |
No |
||
|
|
Controls whether the authorization server prompts the user for re-authentication or consent. Select one of the following:
|
No |
||
|
|
The number of seconds before token expiry at which the SDK proactively refreshes the token. Defaults to |
No |
||
|
|
The URI to redirect to after sign-out. Maps to the This value must be registered in your OAuth 2.0 client. |
No |
||
|
|
Space-separated BCP 47 language tags indicating the preferred display language for the authorization server’s UI. For example, |
No |