authenticate
Performs FIDO2 authentication using the initialized request options.
This method initiates the FIDO2 authentication ceremony using Android Credential Manager, prompting the user to verify their identity using available discoverable credentials (passkeys). The authentication can use biometrics, PIN, or other verification methods supported by the authenticator.
Authentication Flow:
Converts the publicKeyCredentialRequestOptions to GetPublicKeyCredentialOption
Calls the Android Credential Manager to perform authentication
Processes the returned credential response
Formats the response according to server expectations
Automatically submits the response to the Journey workflow
Response Format: The response is formatted differently based on the supportsJsonResponse flag:
Legacy String Format (supportsJsonResponse = false):
{"type":"webauthn.get","challenge":"test-challenge"}::dGVzdC1hdXRoZW50aWNhdG9yLWRhdGE::dGVzdC1zaWduYXR1cmU::dGVzdC1yYXctaWQ::dGVzdC11c2VyLWhhbmRsZQJSON Format (supportsJsonResponse = true):
{
"authenticatorType": "PLATFORM",
"response": "{\"type\":\"webauthn.get\",\"challenge\":\"test-challenge\"}::dGVzdC1hdXRoZW50aWNhdG9yLWRhdGE::dGVzdC1zaWduYXR1cmU::dGVzdC1yYXctaWQ::dGVzdC11c2VyLWhhbmRsZQ"
}Data Components (separated by "::"):
Client data JSON (contains challenge, origin, and type information)
Authenticator data (Base64 encoded, then converted to integer string representation)
Signature (Base64 encoded, then converted to integer string representation)
Raw credential ID (Base64 encoded credential identifier)
User handle (Base64 encoded user identifier, optional)
Return
A Result containing the authentication response as a JsonObject on success, or an exception on failure. The response is automatically submitted to the Journey workflow.
Parameters
A transformation function that converts JsonObject to GetPublicKeyCredentialOption. Allows customization of credential manager options like preferImmediatelyAvailableCredentials.