{"version":3,"file":"isIamAuthApplicable.mjs","sources":["../../../src/utils/isIamAuthApplicable.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Determines if IAM authentication should be applied for a GraphQL request.\n *\n * This function checks the `headers` of the HTTP request to determine if IAM authentication\n * is applicable. IAM authentication is considered applicable if there is no `authorization`\n * header, no `x-api-key` header, and `signingServiceInfo` is provided.\n *\n * @param request - The HTTP request object containing headers.\n * @param signingServiceInfo - Optional signing service information,\n * including service and region.\n * @returns A boolean `true` if IAM authentication should be applied.\n *\n * @internal\n */\nexport const isIamAuthApplicableForGraphQL = ({ headers }, signingServiceInfo) => !headers.authorization && !headers['x-api-key'] && !!signingServiceInfo;\n/**\n * Determines if IAM authentication should be applied for a REST request.\n *\n * This function checks the `headers` of the HTTP request to determine if IAM authentication\n * is applicable. IAM authentication is considered applicable if there is no `authorization`\n * header and `signingServiceInfo` is provided.\n *\n * @param request - The HTTP request object containing headers.\n * @param signingServiceInfo - Optional signing service information,\n * including service and region.\n * @returns A boolean `true` if IAM authentication should be applied.\n *\n * @internal\n */\nexport const isIamAuthApplicableForRest = ({ headers }, signingServiceInfo) => !headers.authorization && !!signingServiceInfo;\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,6BAA6B,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,KAAK,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,0BAA0B,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,KAAK,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC;;;;"}