@aws-sdk/credential-provider-sso
Advanced tools
Comparing version 3.484.0 to 3.485.0
@@ -10,2 +10,3 @@ "use strict"; | ||
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }) => { | ||
var _a; | ||
let token; | ||
@@ -50,7 +51,8 @@ const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; | ||
const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp; | ||
const credentialScope = (_a = ssoResp === null || ssoResp === void 0 ? void 0 : ssoResp.roleCredentials) === null || _a === void 0 ? void 0 : _a.credentialScope; | ||
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { | ||
throw new property_provider_1.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); | ||
} | ||
return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) }; | ||
return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; | ||
}; | ||
exports.resolveSSOCredentials = resolveSSOCredentials; |
@@ -46,6 +46,7 @@ import { GetRoleCredentialsCommand, SSOClient } from "@aws-sdk/client-sso"; | ||
const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp; | ||
const credentialScope = ssoResp?.roleCredentials?.credentialScope; | ||
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { | ||
throw new CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); | ||
} | ||
return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) }; | ||
return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; | ||
}; |
import { AwsCredentialIdentity } from "@smithy/types"; | ||
import { FromSSOInit, SsoCredentialsParameters } from "./fromSSO"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const resolveSSOCredentials: ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }: FromSSOInit & SsoCredentialsParameters) => Promise<AwsCredentialIdentity>; |
{ | ||
"name": "@aws-sdk/credential-provider-sso", | ||
"version": "3.484.0", | ||
"version": "3.485.0", | ||
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials", | ||
@@ -27,8 +27,8 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/client-sso": "3.484.0", | ||
"@aws-sdk/token-providers": "3.484.0", | ||
"@aws-sdk/types": "3.468.0", | ||
"@aws-sdk/client-sso": "3.485.0", | ||
"@aws-sdk/token-providers": "3.485.0", | ||
"@aws-sdk/types": "3.485.0", | ||
"@smithy/property-provider": "^2.0.0", | ||
"@smithy/shared-ini-file-loader": "^2.0.6", | ||
"@smithy/types": "^2.7.0", | ||
"@smithy/types": "^2.8.0", | ||
"tslib": "^2.5.0" | ||
@@ -35,0 +35,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32202
451
+ Added@aws-sdk/client-sso@3.485.0(transitive)
+ Added@aws-sdk/core@3.485.0(transitive)
+ Added@aws-sdk/middleware-host-header@3.485.0(transitive)
+ Added@aws-sdk/middleware-logger@3.485.0(transitive)
+ Added@aws-sdk/middleware-recursion-detection@3.485.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.485.0(transitive)
+ Added@aws-sdk/region-config-resolver@3.485.0(transitive)
+ Added@aws-sdk/token-providers@3.485.0(transitive)
+ Added@aws-sdk/types@3.485.0(transitive)
+ Added@aws-sdk/util-endpoints@3.485.0(transitive)
+ Added@aws-sdk/util-user-agent-browser@3.485.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.485.0(transitive)
- Removed@aws-sdk/client-sso@3.484.0(transitive)
- Removed@aws-sdk/core@3.481.0(transitive)
- Removed@aws-sdk/middleware-host-header@3.468.0(transitive)
- Removed@aws-sdk/middleware-logger@3.468.0(transitive)
- Removed@aws-sdk/middleware-recursion-detection@3.468.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.478.0(transitive)
- Removed@aws-sdk/region-config-resolver@3.484.0(transitive)
- Removed@aws-sdk/token-providers@3.484.0(transitive)
- Removed@aws-sdk/types@3.468.0(transitive)
- Removed@aws-sdk/util-endpoints@3.478.0(transitive)
- Removed@aws-sdk/util-user-agent-browser@3.468.0(transitive)
- Removed@aws-sdk/util-user-agent-node@3.470.0(transitive)
Updated@aws-sdk/client-sso@3.485.0
Updated@aws-sdk/types@3.485.0
Updated@smithy/types@^2.8.0