public override IWebUser Login(IAccountLogin creds) { var auth = _provider.Login(creds); if (auth == null) { throw new Exception("Invalid Credentials"); } var user = new WebUser(auth); user.SetClaims(); return(user); }
internal IUser Login(IAccountLogin creds) { // more sql Account account = _db.QueryFirstOrDefault <Account>(@" SELECT * FROM users WHERE email = @Email ", creds); if (account != null) { var valid = BCrypt.Net.BCrypt.Verify(creds.Password, account.Password); if (valid) { return(account.GetUser()); } } return(null); }
public IUser Login(IAccountLogin creds) { return(_repo.Login(creds)); }
public virtual T Login(IAccountLogin creds) { throw new NotImplementedException(); }