getParams method

Map<String, String> getParams(
  1. Map<String, String> serviceParameters,
  2. DateTime now
)

公共参数构建 https://help.aliyun.com/document_detail/70058.html

注意此处已经将参数按照字母顺序排列,请勿随意更改顺序。

Implementation

Map<String, String> getParams(
  Map<String, String> serviceParameters,
  DateTime now,
) {
  return <String, String>{
    'AccessKeyId': _accessKeyId,
    'Action': 'ExecuteRequest',
    'Format': 'JSON',
    'Service': 'account_takeover_pro',
    'ServiceParameters': jsonEncode(serviceParameters),
    'SignatureMethod': 'Hmac-SHA1',
    'SignatureNonce': const Uuid().v5(
      Uuid.NAMESPACE_URL,
      now.millisecondsSinceEpoch.toString(),
    ),
    'SignatureVersion': '1.0',
    'Timestamp': getDateString(now),
    'Version': '2020-07-06',
  };
}