コード例 #1
0
        public async Task <Person> AuthenticateUserAsync(string login, string password)
        {
            var user = await _personRepository.GetByLoginAsync(login);

            if (user == null)
            {
                return(null);
            }

            if (logic.ComparePasswords(password, user))
            {
                return(user);
            }

            return(null);
        }