public void Join(string userName, string password) { _validator.ValidateUser(userName, password); _membership.Add(userName, password); var message = _formatter().FormatMessage(userName); _notifier.SendNotification(message); }
public Notification LoginUser(string userName, string password, bool rememberMe) { var notification = new Notification(); if (!_membershipValidator.ValidateUser(userName, password)) { notification.RegisterMessage(StringToken.FromKeyString("User Name or Password", "Please check your username and password")); return(notification); } _authenticationContext.ThisUserHasBeenAuthenticated(userName, rememberMe); return(notification); }