PingOneMFA

object PingOneMFA

Entry point for all PingOne MFA operations.

This is a singleton that wraps the native PingOne MFA SDK (pingidsdkv2) behind a coroutine-friendly API. All native callback-based operations are bridged to suspend functions that return Result — callers never need a try/catch.

Lifecycle

Call initialize once at application startup before invoking any other function. The call is guarded by a mutex and is idempotent — repeated calls after a successful initialization return Result.success immediately.

Error handling

All suspend functions return Result.failure wrapping a PingOneMFAException on error. The native com.pingidentity.pingidsdkv2.PingOneSDKError type is never exposed.

Functions

Link copied to clipboard

Approves the push authentication request represented by notification when the app is in the background (e.g. the user tapped Approve on the system notification banner).

Link copied to clipboard

Denies the push authentication request represented by notification when the app is in the background (e.g. the user tapped Deny on the system notification banner).

Link copied to clipboard

Generates a cryptographic mobile payload string from the native PingOne MFA SDK.

Link copied to clipboard

Returns metadata for all currently paired PingOne MFA accounts.

Link copied to clipboard

Returns the current one-time passcode and its remaining validity window.

Link copied to clipboard
suspend fun initialize(geo: Geo): Result<Unit>

Configures the PingOne MFA SDK for the given service geo region.

Link copied to clipboard
suspend fun pair(pairingKey: String): Result<Unit>

Pairs the device with a PingOne MFA account using pairingKey.

Link copied to clipboard
suspend fun processRemoteNotification(message: RemoteMessage): Result<PushNotification?>

Converts an incoming FCM message into a typed PushNotification.

Link copied to clipboard
suspend fun setDeviceToken(pushToken: String): Result<Unit>

Registers or refreshes the FCM push pushToken with PingOne.