Exemple #1
0
        public async Task <User> Login(string mail, string password)
        {
            if (password == null)
            {
                throw new ArgumentNullException(nameof(password));
            }

            CompanyUser companyUser = new CompanyUser();

            //Set OAuth1 token in the session.
            await _UserContext.ApiLoginAsync(mail, password);

            var test = await _UserContext.ApiGetCustomerTokenAsync();

            companyUser = new CompanyUser(test);

            return(companyUser);
        }