diff --git a/dw/customer/AuthenticationStatus.js b/dw/customer/AuthenticationStatus.js new file mode 100644 index 0000000..39a6bf4 --- /dev/null +++ b/dw/customer/AuthenticationStatus.js @@ -0,0 +1,14 @@ +const AuthenticationStatus = function() {} + +AuthenticationStatus.prototype.getCustomer = function getCustomer() {} +AuthenticationStatus.prototype.getStatus = function getStatus() {} +AuthenticationStatus.prototype.isAuthenticated = function isAuthenticated() {} + +AuthenticationStatus.AUTH_OK = "AUTH_OK"; +AuthenticationStatus.ERROR_CUSTOMER_DISABLED = "ERROR_CUSTOMER_DISABLED"; +AuthenticationStatus.ERROR_CUSTOMER_LOCKED = "ERROR_CUSTOMER_LOCKED"; +AuthenticationStatus.ERROR_CUSTOMER_NOT_FOUND = "ERROR_CUSTOMER_NOT_FOUND"; +AuthenticationStatus.ERROR_PASSWORD_EXPIRED = "ERROR_PASSWORD_EXPIRED"; +AuthenticationStatus.ERROR_PASSWORD_MISMATCH = "ERROR_PASSWORD_MISMATCH"; + +module.exports = AuthenticationStatus; diff --git a/dw/customer/Customer.js b/dw/customer/Customer.js index 946ca09..1879c37 100644 --- a/dw/customer/Customer.js +++ b/dw/customer/Customer.js @@ -2,6 +2,7 @@ class Customer { constructor(profile) { this.ID = 'ID'; this.profile = profile || new (require('./Profile'))(); + this.AuthenticationStatus = require('./AuthenticationStatus'); } isRegistered () { diff --git a/dw/customer/CustomerMgr.js b/dw/customer/CustomerMgr.js index 26438ea..0aa209d 100644 --- a/dw/customer/CustomerMgr.js +++ b/dw/customer/CustomerMgr.js @@ -18,6 +18,10 @@ CustomerMgr.getExternallyAuthenticatedCustomerProfile = function(){}; CustomerMgr.loginExternallyAuthenticatedCustomer = function(){}; CustomerMgr.getCustomerByCustomerNumber = function(){}; CustomerMgr.createCustomer = function() {}; +CustomerMgr.authenticateCustomer = function() {}; +CustomerMgr.loginCustomer = function() {}; +CustomerMgr.getCustomerByLogin = function() {}; +CustomerMgr.isAcceptablePassword = function() {}; CustomerMgr.logoutCustomer = function() {}; CustomerMgr.getSiteCustomerList = () => customerList; CustomerMgr.prototype.customerGroups=null; diff --git a/dw/system.js b/dw/system.js index 4edb9c5..d022804 100644 --- a/dw/system.js +++ b/dw/system.js @@ -14,3 +14,4 @@ exports.Status = require('./system/Status.js'); exports.StatusItem = require('./system/StatusItem.js'); exports.System = require('./system/System.js'); exports.Logger = require('./system/Logger.js'); +exports.Transaction = require('./system/Transaction.js'); \ No newline at end of file