@aws-amplify/core
Version:
Core category of aws-amplify
20 lines (19 loc) • 916 B
JavaScript
;
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCredentialScope = void 0;
var constants_1 = require("../constants");
/**
* Returns the credential scope which restricts the resulting signature to the specified region and service.
*
* @param date Current date in the format 'YYYYMMDD'.
* @param region AWS region in which the service resides.
* @param service Service to which the signed request is being sent.
*
* @returns A string representing the credential scope with format 'YYYYMMDD/region/service/aws4_request'.
*
* @internal
*/
var getCredentialScope = function (date, region, service) { return "".concat(date, "/").concat(region, "/").concat(service, "/").concat(constants_1.KEY_TYPE_IDENTIFIER); };
exports.getCredentialScope = getCredentialScope;