requestAttestation method
Future<PlatformAttestation>
requestAttestation(
- String payload,
- AttestationOptions options
override
Asks Play Integrity (Android) or App Attest (iOS) for a token bound to
payload: the nonce or client data hash is the SHA-256 of its UTF-8
bytes. Fails when the service is unavailable on this device.
Implementation
@override
Future<PlatformAttestation> requestAttestation(
String payload,
AttestationOptions options,
) async {
final raw = await methodChannel.invokeMapMethod<Object?, Object?>(
'attest',
<String, Object?>{'payload': payload, ...options.toMap()},
);
return PlatformAttestation.fromMap(raw ?? const <Object?, Object?>{});
}