createAppAttestation

suspend fun createAppAttestation(appAttestationChallenge: String, integrityTokenProvider: StandardIntegrityManager.StandardIntegrityTokenProvider? = this.integrityTokenProvider, canRetryOnInvalidTokenProvider: Boolean = true): String?

Creates a Salesforce App Attestation External Client App (ECA) Plugin "attestation". First a Salesforce Mobile App Attestation "Challenge" is requested for the device id. Then, a Google Play Integrity API Token is fetched using the "Challenge" as the Request Hash. The resulting token is encoded into a value usable as the "attestation" parameter in the Salesforce OAuth authorization request.

This method is not intended for public use outside of Salesforce Mobile SDK.

TODO: Make this Kotlin-internal once it is no longer referenced by Java. ECJ20260420

Return

The "attestation" value usable in Salesforce OAuth authorization and token refresh requests or null if the value cannot be created

Parameters

appAttestationChallenge

The Salesforce Mobile App Attestation External Client App (ECA) Plug-In "Challenge" to use

integrityTokenProvider

The Google Play App Integrity API Integrity Token Provider. This parameter is intended for testing purposes only

canRetryOnInvalidTokenProvider

When true (the default), a single inline retry with a freshly prepared Integrity Token Provider is allowed if the request fails with INTEGRITY_TOKEN_PROVIDER_INVALID. The recursive retry call sets this false to guarantee at most one retry and prevent unbounded recursion on the caller thread