exchangeAppAttestAttestation method

Accepts a AppAttest CBOR Attestation, and uses the developer's preconfigured team and bundle IDs to verify the token with Apple.

Returns an Attestation Artifact that can later be exchanged for an AttestationToken in ExchangeAppAttestAssertion.

request - The metadata request object.

Request parameters:

app - Required. The full resource name to the iOS App. Format: "projects/{project_id}/apps/{app_id}" Value must have pattern ^projects/\[^/\]+/apps/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse>
    exchangeAppAttestAttestation(
  GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest request,
  core.String app, {
  core.String? $fields,
}) async {
  final _body = convert.json.encode(request.toJson());
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v1beta/' +
      core.Uri.encodeFull('$app') +
      ':exchangeAppAttestAttestation';

  final _response = await _requester.request(
    _url,
    'POST',
    body: _body,
    queryParams: _queryParams,
  );
  return GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse
      .fromJson(_response as core.Map<core.String, core.dynamic>);
}