sign method

Future<({String keyId, String signedBlob})> sign(
  1. List<int> data
)

Signs the given data using the IAM Credentials API.

This method calls the IAM Credentials API signBlob endpoint to sign data as the impersonated service account.

Returns a record containing the signature as a base64-encoded String and the key ID used to sign the blob.

Throws ServerRequestFailedException if the signing operation fails.

See: https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob

Implementation

Future<({String signedBlob, String keyId})> sign(List<int> data) => signBlob(
  _sourceClient,
  data,
  serviceAccountEmail: targetServiceAccount,
  universeDomain: _universeDomain,
);