generate Mobile Payload Suspend
Generates a payload string for any communication needed between the customer mobile app and the PingOne server.
The PingOne Native SDK returns a native payload to the customer native application. The payload is a small data package created by the PingOne Native SDK component, which is used as part of the device's authorization.
Sample usage:
lifecycleScope.launch {
try {
val payload = PingOne.generateMobilePayload(context)
if (payload != null) {
// Pass the payload further as a param of the OIDC request
}
} catch (e: PingOneSDKException) {
// Handle error
Log.e("PingOne", "Generate payload failed: ${e.error.message}")
}
}
Return
The mobile payload as a JWT string if process completes successfully, null otherwise
Parameters
context
The context of the calling application.
Throws
if the operation fails