public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null) { DbUtil.LogActivity($"Invalid log in {status}:{errorMessage} ({user?.Username})"); return(new UserValidationResult { User = user, ErrorMessage = errorMessage, Status = status }); }
private static int MapStatusToError(UserValidationStatus status) { switch (status) { case UserValidationStatus.Success: return(BaseMessage.API_ERROR_NONE); case UserValidationStatus.PinExpired: return(BaseMessage.API_ERROR_PIN_EXPIRED); case UserValidationStatus.PinInvalid: return(BaseMessage.API_ERROR_PIN_INVALID); case UserValidationStatus.SessionTokenExpired: return(BaseMessage.API_ERROR_SESSION_TOKEN_EXPIRED); default: return(BaseMessage.API_ERROR_SESSION_TOKEN_NOT_FOUND); } }
private static int MapStatusToError(UserValidationStatus status) { switch (status) { case UserValidationStatus.Success: return BaseMessage.API_ERROR_NONE; case UserValidationStatus.PinExpired: return BaseMessage.API_ERROR_PIN_EXPIRED; case UserValidationStatus.PinInvalid: return BaseMessage.API_ERROR_PIN_INVALID; case UserValidationStatus.SessionTokenExpired: return BaseMessage.API_ERROR_SESSION_TOKEN_EXPIRED; default: return BaseMessage.API_ERROR_SESSION_TOKEN_NOT_FOUND; } }
public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null) { return new UserValidationResult { User = user, ErrorMessage = errorMessage, Status = status }; }
public static UserValidationResult Invalid(UserValidationStatus status, string errorMessage = null, User user = null) { return(new UserValidationResult { User = user, ErrorMessage = errorMessage, Status = status }); }