Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dw/customer/AuthenticationStatus.js
Original file line number Diff line number Diff line change
@@ -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;
1 change: 1 addition & 0 deletions dw/customer/Customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class Customer {
constructor(profile) {
this.ID = 'ID';
this.profile = profile || new (require('./Profile'))();
this.AuthenticationStatus = require('./AuthenticationStatus');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this should be an instance and whether to pass this as a parameter?

}

isRegistered () {
Expand Down
6 changes: 5 additions & 1 deletion dw/customer/CustomerMgr.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ CustomerMgr.getExternallyAuthenticatedCustomerProfile = function(){};
CustomerMgr.loginExternallyAuthenticatedCustomer = function(){};
CustomerMgr.getCustomerByCustomerNumber = function(){};
CustomerMgr.createCustomer = function() {};
CustomerMgr.logoutCustomer = function() {};
CustomerMgr.authenticateCustomer = function() {};
CustomerMgr.loginCustomer = function() {};
CustomerMgr.getCustomerByLogin = function() {};
CustomerMgr.isAcceptablePassword = function isAcceptablePassword() {};
CustomerMgr.logoutCustomer = function logoutCustomer() {};
CustomerMgr.getSiteCustomerList = () => customerList;
CustomerMgr.prototype.customerGroups=null;
CustomerMgr.prototype.profile=null;
Expand Down
1 change: 1 addition & 0 deletions dw/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');