Makoto

class Makoto(androidAttestationConfiguration: AndroidAttestationConfiguration, iosAttestationConfiguration: IosAttestationConfiguration, val clock: <Error class: unknown class> = Clock.System, val verificationTimeOffset: Duration = DEFAULT_TIME_OFFSET) : AttestationService(source)

Default, functional Android and Apple App and Key Attestation in all its glory.

Once configured, this class provides a streamlined interface for mobile client attestation

Parameters

androidAttestationConfiguration

Configuration for Android key attestation. See AndroidAttestationConfiguration for details.

iosAttestationConfiguration

IOS AppAttest configuration. See IosAttestationConfiguration for details.

clock

a clock to set the time of verification (used for certificate validity checks)

verificationTimeOffset

allows for fine-grained clock drift compensation (this offsets the certificate validity duration checks and attestation statement validity checks); can be negative. Note that this is a real offset, shifting the time window of validity, not extending it!

Constructors

Link copied to clipboard
constructor(androidAttestationConfigurationJ: AndroidAttestationConfiguration, iosAttestationConfigurationJ: IosAttestationConfiguration, verificationTimeOffsetJ: Duration = DEFAULT_TIME_OFFSET.toJavaDuration(), javaClock: Clock = java.time.Clock.systemUTC())

Java-friendly constructor with java.time types

constructor(androidAttestationConfiguration: AndroidAttestationConfiguration, iosAttestationConfiguration: IosAttestationConfiguration, clock: <Error class: unknown class> = Clock.System, verificationTimeOffset: Duration = DEFAULT_TIME_OFFSET)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Exposes Android-specific API to reduce toplevel clutter

Link copied to clipboard
val clock: <Error class: unknown class>
Link copied to clipboard
open override val ios: AttestationService.IOS

Groups iOS-specific API to reduce toplevel clutter.

Link copied to clipboard

The shortest attestation validity duration over Android and iOS configuration. Useful to get the longest sensible nonce validity duration

Functions

Link copied to clipboard
fun collectDebugInfo(attestationProof: Attestation, challenge: ByteArray): WardenDebugAttestationStatement

Collects a debug dump of an attestation call. Use this if you called ``verifyKeyAttestation( attestationProof: Attestation, challenge: ByteArray ): KeyAttestation<PublicKey>``

fun collectDebugInfo(attestationProof: List<ByteArray>, challenge: ByteArray, publicKey: PublicKey): WardenDebugAttestationStatement

Collects a debug dump of an attestation call. Use this if you called `` <T : PublicKey> verifyKeyAttestation( attestationProof: List<ByteArray>, expectedChallenge: ByteArray, keyToBeAttested: T )``

fun collectDebugInfo(attestationProof: List<ByteArray>, challenge: ByteArray, rawPublicKey: ByteArray): WardenDebugAttestationStatement

Collects a debug dump of an attestation call. Use this if you called ``verifyKeyAttestation( attestationProof: List<ByteArray>, challenge: ByteArray, encodedPublicKey: ByteArray ): KeyAttestation<PublicKey>``

@JvmName(name = "collectKeyAttestationLegacy")
fun collectDebugInfo(attestationProof: List<ByteArray>, challenge: ByteArray, clientData: ByteArray? = null): WardenDebugAttestationStatement

Collects a debug dump of an attestation call. Use this if you called ``verifyAttestation( attestationProof: List<ByteArray>, challenge: ByteArray, clientData: ByteArray? ): AttestationResult``

Link copied to clipboard
fun <T : PublicKey> verifyKeyAttestation(attestationProof: List<ByteArray>, expectedChallenge: ByteArray, keyToBeAttested: T): KeyAttestation<T>

Verifies key attestation for both Android and Apple devices.

fun verifyKeyAttestation(attestationProof: List<ByteArray>, challenge: ByteArray, encodedPublicKey: ByteArray): KeyAttestation<PublicKey>

Same as verifyKeyAttestation, but taking an encoded (either ANSI X9.63 or DER) publix key as a byte array

open override fun verifyKeyAttestation(attestationProof: Attestation, challenge: ByteArray): KeyAttestation<PublicKey>