Esempio n. 1
0
        public Models.Login GetUser(LoginContext loginContext)
        {
            var existingUser = _authenticationContext.Logins.FirstOrDefault(user => user.Username.Equals(loginContext.username) && user.Password.Equals(loginContext.password));

            if (existingUser != null)
            {
                return(existingUser);
            }

            return(null);
        }
Esempio n. 2
0
 public bool UserIsAuthorized(LoginContext loginContext)
 {
     return(_authenticationContext.Logins.Any(user => user.Username.Equals(loginContext.username) && user.Password.Equals(loginContext.password)));
 }