@ciscospark/test-users-legacy
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -126,2 +126,14 @@ "use strict"; | ||
options = options || {}; | ||
var body = _.defaultsDeep({}, options, { | ||
// The four characters on the end are to hit all the password requirements | ||
password: generateRandomString(10) + "zA1*", | ||
displayName: randomName(), | ||
clientId: process.env.CISCOSPARK_CLIENT_ID, | ||
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET, | ||
emailTemplate: options.email || options.emailAddress, | ||
// defaultsDeep doesn't seem to handle arrays | ||
entitlements: options.entitlements || ["spark", "squaredCallInitiation", "squaredRoomModeration", "squaredInviter", "webExSquared"], | ||
scopes: options.scope || process.env.CISCOSPARK_SCOPE | ||
}); | ||
return requestWithAuth({ | ||
@@ -131,15 +143,6 @@ method: "POST", | ||
json: true, | ||
body: _.defaultsDeep(options, { | ||
// The four characters on the end are to hit all the password requirements | ||
password: generateRandomString(10) + "zA1*", | ||
displayName: randomName(), | ||
clientId: process.env.CISCOSPARK_CLIENT_ID, | ||
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET, | ||
emailTemplate: options.email || options.emailAddress, | ||
entitlements: ["spark", "squaredCallInitiation", "squaredRoomModeration", "squaredInviter", "webExSquared"], | ||
scopes: options.scope || process.env.CISCOSPARK_CLIENT_SCOPE | ||
}) | ||
body: body | ||
}).then(function (res) { | ||
return (0, _assign2.default)({ | ||
password: options.password, | ||
password: JSON.parse(res.request.body).password, | ||
emailAddress: res.body.user.email, | ||
@@ -146,0 +149,0 @@ displayName: res.body.user.name |
{ | ||
"name": "@ciscospark/test-users-legacy", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -117,2 +117,20 @@ const assert = require(`assert`); | ||
options = options || {}; | ||
const body = _.defaultsDeep({}, options, { | ||
// The four characters on the end are to hit all the password requirements | ||
password: `${generateRandomString(10)}zA1*`, | ||
displayName: randomName(), | ||
clientId: process.env.CISCOSPARK_CLIENT_ID, | ||
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET, | ||
emailTemplate: options.email || options.emailAddress, | ||
// defaultsDeep doesn't seem to handle arrays | ||
entitlements: options.entitlements || [ | ||
`spark`, | ||
`squaredCallInitiation`, | ||
`squaredRoomModeration`, | ||
`squaredInviter`, | ||
`webExSquared` | ||
], | ||
scopes: options.scope || process.env.CISCOSPARK_SCOPE | ||
}); | ||
return requestWithAuth({ | ||
@@ -122,21 +140,6 @@ method: `POST`, | ||
json: true, | ||
body: _.defaultsDeep(options, { | ||
// The four characters on the end are to hit all the password requirements | ||
password: `${generateRandomString(10)}zA1*`, | ||
displayName: randomName(), | ||
clientId: process.env.CISCOSPARK_CLIENT_ID, | ||
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET, | ||
emailTemplate: options.email || options.emailAddress, | ||
entitlements: [ | ||
`spark`, | ||
`squaredCallInitiation`, | ||
`squaredRoomModeration`, | ||
`squaredInviter`, | ||
`webExSquared` | ||
], | ||
scopes: options.scope || process.env.CISCOSPARK_CLIENT_SCOPE | ||
}) | ||
body | ||
}) | ||
.then((res) => Object.assign({ | ||
password: options.password, | ||
password: JSON.parse(res.request.body).password, | ||
emailAddress: res.body.user.email, | ||
@@ -143,0 +146,0 @@ displayName: res.body.user.name |
@@ -113,2 +113,7 @@ const TestUsers = require(`../../..`); | ||
it(`creates a test user in another org`, () => assert.isFulfilled(TestUsers.create({ | ||
orgId: `kmsFederation`, | ||
entitlements: [`webExSquared`] | ||
}))); | ||
}); | ||
@@ -115,0 +120,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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
27799
763