aws-user-service
Advanced tools
Comparing version 1.0.13 to 1.1.0
33
index.js
@@ -15,2 +15,6 @@ const AWS = require('aws-sdk'); | ||
async getUser(userId) { | ||
return await getUserById(userId) | ||
} | ||
async getUserById(userId) { | ||
const listUsersResponse = await this.cognitoidentityserviceprovider.listUsers({ | ||
@@ -20,4 +24,4 @@ UserPoolId: this.authIntegrationUserPoolId, | ||
Limit: 1 | ||
}).promise(); | ||
return listUsersResponse.Users[0]; | ||
}).promise() | ||
return listUsersResponse.Users[0] | ||
} | ||
@@ -83,4 +87,12 @@ | ||
updateUserAttributes = async (userId, attributeName, attributeValue) => { | ||
async impersonateUser(userId, user) { | ||
} | ||
async removeImpersonation(userId) { | ||
//await updateUserAttributes(userId, ) | ||
} | ||
async updateUserAttributes(userId, attributeName, attributeValue) { | ||
var params = { | ||
@@ -98,2 +110,17 @@ "UserAttributes": [ | ||
} | ||
async updateUserAttributes(userId, attributeName, attributeValue) { | ||
var params = { | ||
"UserAttributes": [ | ||
{ | ||
"Name": attributeName, | ||
"Value": attributeValue | ||
} | ||
], | ||
"Username": userId, | ||
"UserPoolId": this.authIntegrationUserPoolId | ||
} | ||
return await this.cognitoidentityserviceprovider.adminUpdateUserAttributes(params).promise() | ||
} | ||
} |
{ | ||
"name": "aws-user-service", | ||
"version": "1.0.13", | ||
"version": "1.1.0", | ||
"description": "Contain methods to work with asw user", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
3950
97