@aws-sdk/middleware-signing 3.972.23 → 3.973.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +2 -2
- package/dist-es/awsAuthMiddleware.js +1 -1
- package/dist-es/utils/isClockSkewed.js +1 -1
- package/dist-types/ts3.4/awsAuthConfiguration.d.ts +7 -17
- package/dist-types/ts3.4/awsAuthMiddleware.d.ts +5 -16
- package/dist-types/ts3.4/index.d.ts +1 -4
- package/dist-types/ts3.4/utils/getUpdatedSystemClockOffset.d.ts +1 -1
- package/dist-types/ts3.4/utils/isClockSkewed.d.ts +1 -4
- package/package.json +32 -32
package/dist-cjs/index.js
CHANGED
|
@@ -122,7 +122,7 @@ const createConfigBoundCredentialProvider = (input) => {
|
|
|
122
122
|
|
|
123
123
|
const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
|
|
124
124
|
|
|
125
|
-
const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >=
|
|
125
|
+
const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 240000;
|
|
126
126
|
|
|
127
127
|
const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
|
|
128
128
|
const clockTimeInMs = Date.parse(clockTime);
|
|
@@ -196,7 +196,7 @@ const awsAuthMiddleware = (options) => (next, context) => async function (args)
|
|
|
196
196
|
}
|
|
197
197
|
return output;
|
|
198
198
|
};
|
|
199
|
-
const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
|
|
199
|
+
const getDateHeader = (response) => HttpResponse.isInstance(response) ? (response.headers?.date ?? response.headers?.Date) : undefined;
|
|
200
200
|
const awsAuthMiddlewareOptions = {
|
|
201
201
|
name: "awsAuthMiddleware",
|
|
202
202
|
tags: ["SIGNATURE", "AWSAUTH"],
|
|
@@ -65,7 +65,7 @@ export const awsAuthMiddleware = (options) => (next, context) => async function
|
|
|
65
65
|
}
|
|
66
66
|
return output;
|
|
67
67
|
};
|
|
68
|
-
const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
|
|
68
|
+
const getDateHeader = (response) => HttpResponse.isInstance(response) ? (response.headers?.date ?? response.headers?.Date) : undefined;
|
|
69
69
|
export const awsAuthMiddlewareOptions = {
|
|
70
70
|
name: "awsAuthMiddleware",
|
|
71
71
|
tags: ["SIGNATURE", "AWSAUTH"],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { getSkewCorrectedDate } from "./getSkewCorrectedDate";
|
|
2
|
-
export const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >=
|
|
2
|
+
export const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 240000;
|
|
@@ -12,28 +12,20 @@ import {
|
|
|
12
12
|
} from "@smithy/types";
|
|
13
13
|
export interface AwsAuthInputConfig {
|
|
14
14
|
credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
|
|
15
|
-
signer?:
|
|
16
|
-
| RequestSigner
|
|
17
|
-
| ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
|
15
|
+
signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
|
18
16
|
signingEscapePath?: boolean;
|
|
19
17
|
systemClockOffset?: number;
|
|
20
18
|
signingRegion?: string;
|
|
21
|
-
signerConstructor?: new (
|
|
22
|
-
options: SignatureV4Init & SignatureV4CryptoInit
|
|
23
|
-
) => RequestSigner;
|
|
19
|
+
signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner;
|
|
24
20
|
}
|
|
25
21
|
export interface SigV4AuthInputConfig {
|
|
26
22
|
credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
|
|
27
|
-
signer?:
|
|
28
|
-
| RequestSigner
|
|
29
|
-
| ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
|
23
|
+
signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
|
30
24
|
signingEscapePath?: boolean;
|
|
31
25
|
systemClockOffset?: number;
|
|
32
26
|
}
|
|
33
27
|
interface PreviouslyResolved {
|
|
34
|
-
credentialDefaultProvider: (
|
|
35
|
-
input: any
|
|
36
|
-
) => MemoizedProvider<AwsCredentialIdentity>;
|
|
28
|
+
credentialDefaultProvider: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
|
|
37
29
|
region: string | Provider<string>;
|
|
38
30
|
regionInfoProvider?: RegionInfoProvider;
|
|
39
31
|
signingName?: string;
|
|
@@ -44,9 +36,7 @@ interface PreviouslyResolved {
|
|
|
44
36
|
useDualstackEndpoint: Provider<boolean>;
|
|
45
37
|
}
|
|
46
38
|
interface SigV4PreviouslyResolved {
|
|
47
|
-
credentialDefaultProvider: (
|
|
48
|
-
input: any
|
|
49
|
-
) => MemoizedProvider<AwsCredentialIdentity>;
|
|
39
|
+
credentialDefaultProvider: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
|
|
50
40
|
region: string | Provider<string>;
|
|
51
41
|
signingName: string;
|
|
52
42
|
sha256: ChecksumConstructor | HashConstructor;
|
|
@@ -60,9 +50,9 @@ export interface AwsAuthResolvedConfig {
|
|
|
60
50
|
}
|
|
61
51
|
export interface SigV4AuthResolvedConfig extends AwsAuthResolvedConfig {}
|
|
62
52
|
export declare const resolveAwsAuthConfig: <T>(
|
|
63
|
-
input: T & AwsAuthInputConfig & PreviouslyResolved
|
|
53
|
+
input: T & AwsAuthInputConfig & PreviouslyResolved,
|
|
64
54
|
) => T & AwsAuthResolvedConfig;
|
|
65
55
|
export declare const resolveSigV4AuthConfig: <T>(
|
|
66
|
-
input: T & SigV4AuthInputConfig & SigV4PreviouslyResolved
|
|
56
|
+
input: T & SigV4AuthInputConfig & SigV4PreviouslyResolved,
|
|
67
57
|
) => T & SigV4AuthResolvedConfig;
|
|
68
58
|
export {};
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FinalizeRequestMiddleware,
|
|
3
|
-
Pluggable,
|
|
4
|
-
RelativeMiddlewareOptions,
|
|
5
|
-
} from "@smithy/types";
|
|
1
|
+
import { FinalizeRequestMiddleware, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
|
|
6
2
|
import { AwsAuthResolvedConfig } from "./awsAuthConfiguration";
|
|
7
|
-
export declare const awsAuthMiddleware: <
|
|
8
|
-
|
|
9
|
-
Output extends object
|
|
10
|
-
>(
|
|
11
|
-
options: AwsAuthResolvedConfig
|
|
3
|
+
export declare const awsAuthMiddleware: <Input extends object, Output extends object>(
|
|
4
|
+
options: AwsAuthResolvedConfig,
|
|
12
5
|
) => FinalizeRequestMiddleware<Input, Output>;
|
|
13
6
|
export declare const awsAuthMiddlewareOptions: RelativeMiddlewareOptions;
|
|
14
|
-
export declare const getAwsAuthPlugin: (
|
|
15
|
-
|
|
16
|
-
) => Pluggable<any, any>;
|
|
17
|
-
export declare const getSigV4AuthPlugin: (
|
|
18
|
-
options: AwsAuthResolvedConfig
|
|
19
|
-
) => Pluggable<any, any>;
|
|
7
|
+
export declare const getAwsAuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>;
|
|
8
|
+
export declare const getSigV4AuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-signing",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.973.0",
|
|
4
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/middleware-signing",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "AWS SDK for JavaScript Team",
|
|
8
|
+
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
13
|
+
"directory": "packages-internal/middleware-signing"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist-*/**"
|
|
17
|
+
],
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist-cjs/index.js",
|
|
20
|
+
"module": "./dist-es/index.js",
|
|
21
|
+
"types": "./dist-types/index.d.ts",
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
"<4.5": {
|
|
24
|
+
"dist-types/*": [
|
|
25
|
+
"dist-types/ts3.4/*"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
4
29
|
"scripts": {
|
|
5
30
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
31
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -15,46 +40,21 @@
|
|
|
15
40
|
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
|
16
41
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
17
42
|
},
|
|
18
|
-
"main": "./dist-cjs/index.js",
|
|
19
|
-
"module": "./dist-es/index.js",
|
|
20
|
-
"types": "./dist-types/index.d.ts",
|
|
21
|
-
"sideEffects": false,
|
|
22
|
-
"author": {
|
|
23
|
-
"name": "AWS SDK for JavaScript Team",
|
|
24
|
-
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
25
|
-
},
|
|
26
|
-
"license": "Apache-2.0",
|
|
27
43
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/types": "^3.974.
|
|
29
|
-
"@smithy/core": "^3.29.
|
|
30
|
-
"@smithy/signature-v4": "^5.6.
|
|
44
|
+
"@aws-sdk/types": "^3.974.2",
|
|
45
|
+
"@smithy/core": "^3.29.8",
|
|
46
|
+
"@smithy/signature-v4": "^5.6.9",
|
|
31
47
|
"@smithy/types": "^4.16.1",
|
|
32
48
|
"tslib": "^2.6.2"
|
|
33
49
|
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=20.0.0"
|
|
36
|
-
},
|
|
37
|
-
"typesVersions": {
|
|
38
|
-
"<4.5": {
|
|
39
|
-
"dist-types/*": [
|
|
40
|
-
"dist-types/ts3.4/*"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"files": [
|
|
45
|
-
"dist-*/**"
|
|
46
|
-
],
|
|
47
|
-
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/middleware-signing",
|
|
48
|
-
"repository": {
|
|
49
|
-
"type": "git",
|
|
50
|
-
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
51
|
-
"directory": "packages-internal/middleware-signing"
|
|
52
|
-
},
|
|
53
50
|
"devDependencies": {
|
|
54
51
|
"@tsconfig/recommended": "1.0.1",
|
|
55
52
|
"concurrently": "7.0.0",
|
|
56
53
|
"downlevel-dts": "0.10.1",
|
|
57
54
|
"premove": "4.0.0",
|
|
58
55
|
"typescript": "~5.8.3"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.0.0"
|
|
59
59
|
}
|
|
60
60
|
}
|