Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@aws-sdk/client-sso
Advanced tools
AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native
The @aws-sdk/client-sso package is a client library for AWS Single Sign-On (SSO) that allows developers to interact with the AWS SSO service programmatically. It provides methods to manage SSO access to AWS accounts and applications, retrieve user credentials, and manage SSO sessions.
GetRoleCredentials
This feature allows you to retrieve the temporary credentials for an AWS role that the user has access to through AWS SSO.
const { SSOClient, GetRoleCredentialsCommand } = require('@aws-sdk/client-sso');
const client = new SSOClient({ region: 'us-west-2' });
const command = new GetRoleCredentialsCommand({
accountId: '123456789012',
roleName: 'MyRoleName',
accessToken: 'myAccessToken'
});
client.send(command).then((data) => {
console.log(data.roleCredentials);
});
ListAccounts
This feature lists all AWS accounts assigned to the user through AWS SSO.
const { SSOClient, ListAccountsCommand } = require('@aws-sdk/client-sso');
const client = new SSOClient({ region: 'us-west-2' });
const command = new ListAccountsCommand({
accessToken: 'myAccessToken'
});
client.send(command).then((data) => {
console.log(data.accountList);
});
Logout
This feature logs the user out of all AWS SSO sessions.
const { SSOClient, LogoutCommand } = require('@aws-sdk/client-sso');
const client = new SSOClient({ region: 'us-west-2' });
const command = new LogoutCommand({
accessToken: 'myAccessToken'
});
client.send(command).then(() => {
console.log('Successfully logged out');
});
The 'aws-sdk' package is the older version of the AWS SDK for JavaScript. It provides a comprehensive feature set for interacting with AWS services, including AWS SSO. However, it is not as modular as the newer '@aws-sdk/client-sso' and might result in larger bundle sizes if only a subset of services is needed.
The 'aws-amplify' package is a library designed to help build scalable full-stack applications on AWS. It includes authentication features through Amazon Cognito, which can be integrated with AWS SSO for user sign-in and access control. It is a higher-level abstraction compared to '@aws-sdk/client-sso' and includes a broader set of features beyond AWS service interaction.
1.0.0-rc.4 (2020-10-31)
FAQs
AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native
The npm package @aws-sdk/client-sso receives a total of 14,377,649 weekly downloads. As such, @aws-sdk/client-sso popularity was classified as popular.
We found that @aws-sdk/client-sso demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.