AttestationClient
Mobile client, fetching attestation challenges and posting CSRs containing attestation statements to an attestation verification endpoint.
Based on a Ktor client. Automatically installs JSON content negotiation. For testing, it is possible to provide a custom clock for high-level checks. Note that this clock does not affect generated attestation proofs, because those will always use the actual device clock!
Functions
Link copied to clipboard
Posts a csr containing an attestation challenge, as created by createAttestationProof.
Link copied to clipboard
Fetches a challenge from an endpoint. This is the first step in an attestation ceremony. This will fail if the system time is off too much:
Link copied to clipboard
suspend fun AttestationClient.performAttestationFlow(alias: String, fetchChallengeEndpoint: Url, authPromptMessage: String? = null, authPromptCancelText: String? = null, additionalCsrExtensions: List<X509CertificateExtension> = listOf(), additionalCsrAttributes: List<Pkcs10CertificationRequestAttribute> = listOf()): AttestationResponse
Truly integrated attestation in a single call.