@aws-sdk/credential-provider-sso 3.395.0 → 3.398.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.
|
@@ -5,7 +5,6 @@ const client_sso_1 = require("@aws-sdk/client-sso");
|
|
|
5
5
|
const token_providers_1 = require("@aws-sdk/token-providers");
|
|
6
6
|
const property_provider_1 = require("@smithy/property-provider");
|
|
7
7
|
const shared_ini_file_loader_1 = require("@smithy/shared-ini-file-loader");
|
|
8
|
-
const EXPIRE_WINDOW_MS = 15 * 60 * 1000;
|
|
9
8
|
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
10
9
|
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }) => {
|
|
11
10
|
let token;
|
|
@@ -30,7 +29,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
|
|
|
30
29
|
throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
if (new Date(token.expiresAt).getTime() - Date.now() <=
|
|
32
|
+
if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
|
|
34
33
|
throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
|
|
35
34
|
}
|
|
36
35
|
const { accessToken } = token;
|
|
@@ -2,7 +2,6 @@ import { GetRoleCredentialsCommand, SSOClient } from "@aws-sdk/client-sso";
|
|
|
2
2
|
import { fromSso as getSsoTokenProvider } from "@aws-sdk/token-providers";
|
|
3
3
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
4
4
|
import { getSSOTokenFromFile } from "@smithy/shared-ini-file-loader";
|
|
5
|
-
const EXPIRE_WINDOW_MS = 15 * 60 * 1000;
|
|
6
5
|
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
7
6
|
export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }) => {
|
|
8
7
|
let token;
|
|
@@ -27,7 +26,7 @@ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccoun
|
|
|
27
26
|
throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
if (new Date(token.expiresAt).getTime() - Date.now() <=
|
|
29
|
+
if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
|
|
31
30
|
throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
|
|
32
31
|
}
|
|
33
32
|
const { accessToken } = token;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.398.0",
|
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/client-sso": "3.
|
|
28
|
-
"@aws-sdk/token-providers": "3.
|
|
29
|
-
"@aws-sdk/types": "3.
|
|
27
|
+
"@aws-sdk/client-sso": "3.398.0",
|
|
28
|
+
"@aws-sdk/token-providers": "3.398.0",
|
|
29
|
+
"@aws-sdk/types": "3.398.0",
|
|
30
30
|
"@smithy/property-provider": "^2.0.0",
|
|
31
31
|
"@smithy/shared-ini-file-loader": "^2.0.0",
|
|
32
|
-
"@smithy/types": "^2.2.
|
|
32
|
+
"@smithy/types": "^2.2.2",
|
|
33
33
|
"tslib": "^2.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|