returnUrl = returnUrl ?? string.Empty;
var startTime = DateTime.UtcNow;
try
{
var user = await DataRepository.GetAsync<IUserIdentity, ICustomer>(Identities.Anonymous, email);
if (user != null && user.IsActive && Password.Validate(password, user.PasswordHash) && user.HasPermission(Permission.ShipbeatSupport))
{
FormsAuthentication.SetAuthCookie(user.Id.ToString(), remember);
return SigninRedirect(returnUrl);
}
Logger.Security("Failed to authenticate user: {0}", email);
}
catch (Exception exception)
{
Logger.Security(exception, "Failed to authenticate user: {0}", email);
}
尝试通过电子邮件获取用户群时出现错误。