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

auth-n-roll-dev-tools

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-n-roll-dev-tools - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

133

dist/ServiceInMemory/ChangePasswordForced.js

@@ -19,63 +19,88 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username, newPassword, session) {
if (session !== '1234567890') {
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Session is not valid (expected 1234567890)'
};
}
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username, newPassword, session) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!(session !== '1234567890')) {
_context.next = 2;
break;
}
if (!newPassword || !username || !session) {
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Username, NewPassword and Session required'
};
}
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Session is not valid (expected 1234567890)'
};
yield (0, _index.delay)(1000);
case 2:
if (!(!newPassword || !username || !session)) {
_context.next = 4;
break;
}
switch ((0, _index.getState)('changePasswordForced')) {
case _authNRoll.USER_NOT_FOUND_ERROR:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'User not found',
user: {
username: username
}
};
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Username, NewPassword and Session required'
};
case _authNRoll.GENERIC_ERROR:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Generic error',
user: {
username: username
}
};
case 4:
_context.next = 6;
return (0, _index.delay)(1000);
case _authNRoll.INVALID_PASSWORD_ERROR:
throw {
code: _authNRoll.INVALID_PASSWORD_ERROR,
message: 'Password does not conform to policy: Password must have uppercase characters',
user: {
username: username
}
};
case 6:
_context.t0 = (0, _index.getState)('changePasswordForced');
_context.next = _context.t0 === _authNRoll.USER_NOT_FOUND_ERROR ? 9 : _context.t0 === _authNRoll.GENERIC_ERROR ? 10 : _context.t0 === _authNRoll.INVALID_PASSWORD_ERROR ? 11 : 12;
break;
default:
return {
AuthenticationResult: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4YTYtODA4YS00YjQ0ODcwZDNlYmMiLCJldmVudF9pZCI6ImYzYmNmY2I4LTZjZDYtMTFlOC04NDRlLThmNTQ3ZTZmMGVmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE1Mjg2NTMxMTAsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX2ZIVTVQeWdZNSIsImV4cCI6MTUyODY1NjcxMCwiaWF0IjoxNTI4NjUzMTEwLCJqdGkiOiJiZDNhMzZmYy0wZjQ5LTQ2NTItYWY4NS0zODY2MmVhMGYyODIiLCJjbGllbnRfaWQiOiI1N2VxbDNpMGw2czc0NWJ0OWRhOXVia2g3aCIsInVzZXJuYW1lIjoiZGF2aWRlLmZpb3JlbGxvQG5lYXJmb3JtLmNvbSJ9.WKxrOEzmbB6Jhh-FCtNPuXbG0SaBJ5bI45VODU0wIC0OEBv9BY9QOpLXimZG9bQdt-JKcmOl1pLLjimFqcTm1ztpzSxlU_3nAlx5FcSa9cef23rNsasJ3FHIxsYTYo55rQtXdGA5RnfGSfxFAyeqW0CYRRFembMWVtj1AJcZYb1UTMjXqq6pCjfai4utJOHge60BJ7aSUARMQQtRVaI84hp5MunsMW1AYfC7KEi5f-4_GOixG5JFTy96PQt41vyJyEQAz_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VkitmoQ7EYbwglh-Gowi1V994woZsUiSkohDadkSA-ACcJ6QgO1ltkNRSIWYB3hD31EOpLRZTWHfK7dwuy8ZF0ZhuTI3OFnQR68sU9YLLj8LR31o3V3NtpK_ILLPlInTUBmWH_93biQRB8iPeLJ23yiqPa7AM9uNBPR7YtFz9FHQHsktT6DFXy7HQKoiJihW4YD8ktYtYon0EO09_ZQkD8M0KkrZ-FdPOoeC_fEST3w2KDtJMkKJykE3Lgv2kv29IpMGVqO-fJOGsx7yo8U19mQcK0E-eTrIpKhK29v-zj3bG0FjEHPqeltop5fPemSlaDnQtV9uzc54ggT7_6s5G3YQqQ7dSY0K8Zb2gia_ZvGnc5ZYs8OydYdhLzTFlI_hflg6bx-o3sgMUuu3G8pS_Z_LnzCu-YhMYBKje_i9QUR4CPO4L2kW_CEl16U54NXOhk5CjTypQYi88NGXA5zF1Y2xdJ38EDSw-duRWDxq9nWteJW405j4OIFmIlRd6aolbd0oqjxhXrXp2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
},
user: {
username: username
}
};
}
});
case 9:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'User not found',
user: {
username: username
}
};
case 10:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Generic error',
user: {
username: username
}
};
case 11:
throw {
code: _authNRoll.INVALID_PASSWORD_ERROR,
message: 'Password does not conform to policy: Password must have uppercase characters',
user: {
username: username
}
};
case 12:
return _context.abrupt("return", {
AuthenticationResult: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4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K0E-eTrIpKhK29v-zj3bG0FjEHPqeltop5fPemSlaDnQtV9uzc54ggT7_6s5G3YQqQ7dSY0K8Zb2gia_ZvGnc5ZYs8OydYdhLzTFlI_hflg6bx-o3sgMUuu3G8pS_Z_LnzCu-YhMYBKje_i9QUR4CPO4L2kW_CEl16U54NXOhk5CjTypQYi88NGXA5zF1Y2xdJ38EDSw-duRWDxq9nWteJW405j4OIFmIlRd6aolbd0oqjxhXrXp2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
},
user: {
username: username
}
});
case 13:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function ChangePasswordForced(_x, _x2, _x3) {

@@ -82,0 +107,0 @@ return _ref.apply(this, arguments);

@@ -19,54 +19,75 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username, confirmationCode) {
if (!confirmationCode || !username) {
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Username and ConfirmationCode required'
};
}
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username, confirmationCode) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!(!confirmationCode || !username)) {
_context.next = 2;
break;
}
yield (0, _index.delay)(1000);
throw {
code: _authNRoll.VALIDATION_DATA_ERROR,
message: 'Username and ConfirmationCode required'
};
switch ((0, _index.getState)('confirmSignUpResponse')) {
case _authNRoll.VALIDATION_CODE_MISMATCH_ERROR:
throw {
code: _authNRoll.VALIDATION_CODE_MISMATCH_ERROR,
message: 'Code not valid',
user: {
username: username
}
};
case 2:
_context.next = 4;
return (0, _index.delay)(1000);
case _authNRoll.USER_NOT_FOUND_ERROR:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'User not found',
user: {
username: username
}
};
case 4:
_context.t0 = (0, _index.getState)('confirmSignUpResponse');
_context.next = _context.t0 === _authNRoll.VALIDATION_CODE_MISMATCH_ERROR ? 7 : _context.t0 === _authNRoll.USER_NOT_FOUND_ERROR ? 8 : _context.t0 === _authNRoll.EXPIRED_VALIDATION_CODE_ERROR ? 9 : _context.t0 === _authNRoll.GENERIC_ERROR ? 10 : 11;
break;
case _authNRoll.EXPIRED_VALIDATION_CODE_ERROR:
throw {
code: _authNRoll.EXPIRED_VALIDATION_CODE_ERROR,
message: 'Expired code',
user: {
username: username
}
};
case 7:
throw {
code: _authNRoll.VALIDATION_CODE_MISMATCH_ERROR,
message: 'Code not valid',
user: {
username: username
}
};
case _authNRoll.GENERIC_ERROR:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Not managed error',
user: {
username: username
}
};
case 8:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'User not found',
user: {
username: username
}
};
default:
return {};
}
});
case 9:
throw {
code: _authNRoll.EXPIRED_VALIDATION_CODE_ERROR,
message: 'Expired code',
user: {
username: username
}
};
case 10:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Not managed error',
user: {
username: username
}
};
case 11:
return _context.abrupt("return", {});
case 12:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function ConfirmSignUp(_x, _x2) {

@@ -73,0 +94,0 @@ return _ref.apply(this, arguments);

@@ -19,25 +19,42 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (refreshToken) {
yield (0, _index.delay)(1000);
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(refreshToken) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _index.delay)(1000);
switch ((0, _index.getState)('refreshResponse')) {
case _authNRoll.NOT_AUTHORIZED_ERROR:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR'
};
case 2:
_context.t0 = (0, _index.getState)('refreshResponse');
_context.next = _context.t0 === _authNRoll.NOT_AUTHORIZED_ERROR ? 5 : 6;
break;
default:
return {
authData: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4YTYtODA4YS00YjQ0ODcwZDNlYmMiLCJldmVudF9pZCI6ImYzYmNmY2I4LTZjZDYtMTFlOC04NDRlLThmNTQ3ZTZmMGVmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE1Mjg2NTMxMTAsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX2ZIVTVQeWdZNSIsImV4cCI6MTUyODY1NjcxMCwiaWF0IjoxNTI4NjUzMTEwLCJqdGkiOiJiZDNhMzZmYy0wZjQ5LTQ2NTItYWY4NS0zODY2MmVhMGYyODIiLCJjbGllbnRfaWQiOiI1N2VxbDNpMGw2czc0NWJ0OWRhOXVia2g3aCIsInVzZXJuYW1lIjoiZGF2aWRlLmZpb3JlbGxvQG5lYXJmb3JtLmNvbSJ9.WKxrOEzmbB6Jhh-FCtNPuXbG0SaBJ5bI45VODU0wIC0OEBv9BY9QOpLXimZG9bQdt-JKcmOl1pLLjimFqcTm1ztpzSxlU_3nAlx5FcSa9cef23rNsasJ3FHIxsYTYo55rQtXdGA5RnfGSfxFAyeqW0CYRRFembMWVtj1AJcZYb1UTMjXqq6pCjfai4utJOHge60BJ7aSUARMQQtRVaI84hp5MunsMW1AYfC7KEi5f-4_GOixG5JFTy96PQt41vyJyEQAz_G8jZRiWfji1tpk8vKizDFzkm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bwglh-Gowi1V994woZsUiSkohDadkSA-ACcJ6QgO1ltkNRSIWYB3hD31EOpLRZTWHfK7dwuy8ZF0ZhuTI3OFnQR68sU9YLLj8LR31o3V3NtpK_ILLPlInTUBmWH_93biQRB8iPeLJ23yiqPa7AM9uNBPR7YtFz9FHQHsktT6DFXy7HQKoiJihW4YD8ktYtYon0EO09_ZQkD8M0KkrZ-FdPOoeC_fEST3w2KDtJMkKJykE3Lgv2kv29IpMGVqO-fJOGsx7yo8U19mQcK0E-eTrIpKhK29v-zj3bG0FjEHPqeltop5fPemSlaDnQtV9uzc54ggT7_6s5G3YQqQ7dSY0K8Zb2gia_ZvGnc5ZYs8OydYdhLzTFlI_hflg6bx-o3sgMUuu3G8pS_Z_LnzCu-YhMYBKje_i9QUR4CPO4L2kW_CEl16U54NXOhk5CjTypQYi88NGXA5zF1Y2xdJ38EDSw-duRWDxq9nWteJW405j4OIFmIlRd6aolbd0oqjxhXrXp2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
}
};
}
});
case 5:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR'
};
case 6:
return _context.abrupt("return", {
authData: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4YTYtODA4YS00YjQ0ODcwZDNlYmMiLCJldmVudF9pZCI6ImYzYmNmY2I4LTZjZDYtMTFlOC04NDRlLThmNTQ3ZTZmMGVmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc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Kje_i9QUR4CPO4L2kW_CEl16U54NXOhk5CjTypQYi88NGXA5zF1Y2xdJ38EDSw-duRWDxq9nWteJW405j4OIFmIlRd6aolbd0oqjxhXrXp2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
}
});
case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function Refresh(_x) {

@@ -44,0 +61,0 @@ return _ref.apply(this, arguments);

@@ -19,22 +19,39 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username) {
yield (0, _index.delay)(500);
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _index.delay)(500);
switch ((0, _index.getState)('resendValidationCodeResponse')) {
case _authNRoll.GENERIC_ERROR:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Email already verifyed',
user: {
username: username
}
};
case 2:
_context.t0 = (0, _index.getState)('resendValidationCodeResponse');
_context.next = _context.t0 === _authNRoll.GENERIC_ERROR ? 5 : 6;
break;
default:
return {
result: 'OK'
};
}
});
case 5:
throw {
code: _authNRoll.GENERIC_ERROR,
message: 'Email already verifyed',
user: {
username: username
}
};
case 6:
return _context.abrupt("return", {
result: 'OK'
});
case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function ResendValidationCode(_x) {

@@ -41,0 +58,0 @@ return _ref.apply(this, arguments);

@@ -19,22 +19,39 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username) {
yield (0, _index.delay)(500);
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _index.delay)(500);
switch ((0, _index.getState)('resetPassword')) {
case _authNRoll.RESET_PASSWORD_ERROR:
throw {
code: _authNRoll.RESET_PASSWORD_ERROR,
message: 'Error on sending password',
user: {
username: username
}
};
case 2:
_context.t0 = (0, _index.getState)('resetPassword');
_context.next = _context.t0 === _authNRoll.RESET_PASSWORD_ERROR ? 5 : 6;
break;
default:
return {
result: 'OK'
};
}
});
case 5:
throw {
code: _authNRoll.RESET_PASSWORD_ERROR,
message: 'Error on sending password',
user: {
username: username
}
};
case 6:
return _context.abrupt("return", {
result: 'OK'
});
case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function ResetPassword(_x) {

@@ -41,0 +58,0 @@ return _ref.apply(this, arguments);

@@ -19,72 +19,89 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username, password) {
yield (0, _index.delay)(1000);
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username, password) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _index.delay)(1000);
switch ((0, _index.getState)('signinResponse')) {
case _authNRoll.USER_NOT_FOUND_ERROR:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'USER_NOT_FOUND_ERROR',
user: {
username: username
}
};
case 2:
_context.t0 = (0, _index.getState)('signinResponse');
_context.next = _context.t0 === _authNRoll.USER_NOT_FOUND_ERROR ? 5 : _context.t0 === _authNRoll.NOT_AUTHORIZED_ERROR ? 6 : _context.t0 === _authNRoll.USER_NOT_CONFIRMED_ERROR ? 7 : _context.t0 === _authNRoll.FORCE_CHANGE_PASSWORD_CHALLENGE ? 8 : _context.t0 === _authNRoll.SOFTWARE_TOKEN_MFA_CHALLENGE ? 9 : 10;
break;
case _authNRoll.NOT_AUTHORIZED_ERROR:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR',
user: {
username: username
}
};
case 5:
throw {
code: _authNRoll.USER_NOT_FOUND_ERROR,
message: 'USER_NOT_FOUND_ERROR',
user: {
username: username
}
};
case _authNRoll.USER_NOT_CONFIRMED_ERROR:
throw {
code: _authNRoll.USER_NOT_CONFIRMED_ERROR,
message: 'USER_NOT_CONFIRMED_ERROR',
user: {
username: username
}
};
case 6:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR',
user: {
username: username
}
};
case _authNRoll.FORCE_CHANGE_PASSWORD_CHALLENGE:
return {
challenge: {
ChallengeName: 'NEW_PASSWORD_REQUIRED',
Session: '1234567890'
},
user: {
username: username
}
};
case 7:
throw {
code: _authNRoll.USER_NOT_CONFIRMED_ERROR,
message: 'USER_NOT_CONFIRMED_ERROR',
user: {
username: username
}
};
case _authNRoll.SOFTWARE_TOKEN_MFA_CHALLENGE:
return {
challenge: {
ChallengeName: 'SOFTWARE_TOKEN_MFA'
},
user: {
username: username,
firstName: 'Davide',
lastName: 'Fiorello'
}
};
case 8:
return _context.abrupt("return", {
challenge: {
ChallengeName: 'NEW_PASSWORD_REQUIRED',
Session: '1234567890'
},
user: {
username: username
}
});
default:
return {
authData: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4YTYtODA4YS00YjQ0ODcwZDNlYmMiLCJldmVudF9pZCI6ImYzYmNmY2I4LTZjZDYtMTFlOC04NDRlLThmNTQ3ZTZmMGVmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE1Mjg2NTMxMTAsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13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2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
},
user: {
username: username
}
};
}
});
case 9:
return _context.abrupt("return", {
challenge: {
ChallengeName: 'SOFTWARE_TOKEN_MFA'
},
user: {
username: username,
firstName: 'Davide',
lastName: 'Fiorello'
}
});
case 10:
return _context.abrupt("return", {
authData: {
AccessToken: 'eyJraWQiOiJGUEVYRmFKWnZaWTdyZEFiM1pcL3l1UWg5czB4NDErMHRrMzZCUkdcL3lzazQ9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5ZGYxZmMzNi0zODdkLTQ4YTYtODA4YS00YjQ0ODcwZDNlYmMiLCJldmVudF9pZCI6ImYzYmNmY2I4LTZjZDYtMTFlOC04NDRlLThmNTQ3ZTZmMGVmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE1Mjg2NTMxMTAsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX2ZIVTVQeWdZNSIsImV4cCI6MTUyODY1NjcxMCwiaWF0IjoxNTI4NjUzMTEwLCJqdGkiOiJiZDNhMzZmYy0wZjQ5LTQ2NTItYWY4NS0zODY2MmVhMGYyODIiLCJjbGllbnRfaWQiOiI1N2VxbDNpMGw2czc0NWJ0OWRhOXVia2g3aCIsInVzZXJuYW1lIjoiZGF2aWRlLmZpb3JlbGxvQG5lYXJmb3JtLmNvbSJ9.WKxrOEzmbB6Jhh-FCtNPuXbG0SaBJ5bI45VODU0wIC0OEBv9BY9QOpLXimZG9bQdt-JKcmOl1pLLjimFqcTm1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j8SXed0uwTRUbeD2IcL4eU0bHGaERIg6E9L9A0hom-wvszr-fqyCTlp-oH08Fxo6AC_YSILeNZT8xSjGPNyVDh8dd4SGRv9wKIygM00BNu1DphkTCYW729vIBW_sQ9wgHCr7paQXVsfE0OpxwyfnZsx6sCa-1_FSdJstDFpMqb6ztkKu20xbsRlN6_VkitmoQ7EYbwglh-Gowi1V994woZsUiSkohDadkSA-ACcJ6QgO1ltkNRSIWYB3hD31EOpLRZTWHfK7dwuy8ZF0ZhuTI3OFnQR68sU9YLLj8LR31o3V3NtpK_ILLPlInTUBmWH_93biQRB8iPeLJ23yiqPa7AM9uNBPR7YtFz9FHQHsktT6DFXy7HQKoiJihW4YD8ktYtYon0EO09_ZQkD8M0KkrZ-FdPOoeC_fEST3w2KDtJMkKJykE3Lgv2kv29IpMGVqO-fJOGsx7yo8U19mQcK0E-eTrIpKhK29v-zj3bG0FjEHPqeltop5fPemSlaDnQtV9uzc54ggT7_6s5G3YQqQ7dSY0K8Zb2gia_ZvGnc5ZYs8OydYdhLzTFlI_hflg6bx-o3sgMUuu3G8pS_Z_LnzCu-YhMYBKje_i9QUR4CPO4L2kW_CEl16U54NXOhk5CjTypQYi88NGXA5zF1Y2xdJ38EDSw-duRWDxq9nWteJW405j4OIFmIlRd6aolbd0oqjxhXrXp2qcIhFS6TiDb50RKbc3hVlOBBuuO6yMnZwKjkJqDr4yXcHSP5bMmO74cVRBjkZJ4HSz8o6MIkyrSXhuPGt8kCdWuDgH-TlQtT0kTAEWaKWVWurSinM5qhgMb-mzjVzoH.Dk-l1gwwlOkbVwGczxyJGA',
TokenType: 'Bearer'
},
user: {
username: username
}
});
case 11:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function SignIn(_x, _x2) {

@@ -91,0 +108,0 @@ return _ref.apply(this, arguments);

@@ -19,46 +19,63 @@ "use strict";

function () {
var _ref = _asyncToGenerator(function* (username, password) {
yield (0, _index.delay)(1000);
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(username, password) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _index.delay)(1000);
switch ((0, _index.getState)('signupResponse')) {
case _authNRoll.USERNAME_EXISTS_ERROR:
throw {
code: _authNRoll.USERNAME_EXISTS_ERROR,
message: 'USERNAME_EXISTS_ERROR',
user: {
username: username
}
};
case 2:
_context.t0 = (0, _index.getState)('signupResponse');
_context.next = _context.t0 === _authNRoll.USERNAME_EXISTS_ERROR ? 5 : _context.t0 === _authNRoll.NOT_AUTHORIZED_ERROR ? 6 : _context.t0 === _authNRoll.INVALID_PASSWORD_ERROR ? 7 : 8;
break;
case _authNRoll.NOT_AUTHORIZED_ERROR:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR',
user: {
username: username
}
};
case 5:
throw {
code: _authNRoll.USERNAME_EXISTS_ERROR,
message: 'USERNAME_EXISTS_ERROR',
user: {
username: username
}
};
case _authNRoll.INVALID_PASSWORD_ERROR:
throw {
code: _authNRoll.INVALID_PASSWORD_ERROR,
message: 'INVALID_PASSWORD_ERROR',
user: {
username: username
}
};
case 6:
throw {
code: _authNRoll.NOT_AUTHORIZED_ERROR,
message: 'NOT_AUTHORIZED_ERROR',
user: {
username: username
}
};
default:
return {
CodeDeliveryDetails: {
AttributeName: 'some-name',
DeliveryMedium: 'EMAIL',
Destination: 'davide@codeflyer.com'
},
UserConfirmed: false,
UserSub: '1234-1234-1234'
};
}
});
case 7:
throw {
code: _authNRoll.INVALID_PASSWORD_ERROR,
message: 'INVALID_PASSWORD_ERROR',
user: {
username: username
}
};
case 8:
return _context.abrupt("return", {
CodeDeliveryDetails: {
AttributeName: 'some-name',
DeliveryMedium: 'EMAIL',
Destination: 'davide@codeflyer.com'
},
UserConfirmed: false,
UserSub: '1234-1234-1234'
});
case 9:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function SignUp(_x, _x2) {

@@ -65,0 +82,0 @@ return _ref.apply(this, arguments);

{
"name": "auth-n-roll-dev-tools",
"version": "0.1.8",
"version": "0.1.9",
"description": "",

@@ -16,3 +16,3 @@ "main": "dist/index.js",

"dependencies": {
"auth-n-roll": "^0.1.8"
"auth-n-roll": "^0.1.9"
},

@@ -19,0 +19,0 @@ "devDependencies": {

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