public void When(ReportUserLoginFailure c) { Apply(new UserLoginFailureReported(c.Id, c.TimeUtc, _state.SecurityId, c.Ip)); if (_state.DoesLastFailureWarrantLockout()) { Apply(new UserLocked(c.Id, "Login failed too many times", _state.SecurityId)); } }
static string When(ReportUserLoginFailure e) { return string.Format("Report login failure for user {0} at {1}", e.Id.Id, e.TimeUtc); }
static string When(ReportUserLoginFailure e) { return(string.Format("Report login failure for user {0} at {1}", e.Id.Id, e.TimeUtc)); }
public void When(ReportUserLoginFailure c) { Update(c, ar => ar.ReportLoginFailure(c.TimeUtc, c.Ip)); }