New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-user-service

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-user-service - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

17

index.js

@@ -44,13 +44,9 @@ const MongoRepository = require('senter-mongo-repository')

async getUser(userId) {
return await this.getUserById(userId)
}
async getUserFromRequest(request) {
const userId = await this.getUserIdFromRequest(request)
return await this.getUser(userId)
return await this.getUserById(userId)
}
async getUserById(userId) {
const listUsersResponse = await this.cognitoidentityserviceprovider.listUsers({
const listUsersResponsePromise = this.cognitoidentityserviceprovider.listUsers({
UserPoolId: this.authIntegrationUserPoolId,

@@ -60,3 +56,10 @@ Filter: `sub = "${userId}"`,

}).promise()
return listUsersResponse.Users[0]
const getSenterUserPromise = this.userRepository.getById(userId, null, noOrganisationOptions)
const result = await Promise.all([listUsersResponsePromise, getSenterUserPromise])
const cognitoUser = result[0].Users[0]
cognitoUser.organisationId = result[1].organisationId
cognitoUser.id = userId
return cognitoUser
}

@@ -63,0 +66,0 @@

{
"name": "aws-user-service",
"version": "1.2.1",
"version": "1.3.0",
"description": "Contain methods to work with asw user",

@@ -14,2 +14,2 @@ "main": "index.js",

}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc