Port of mongoauth to SQL/Mapper