public AuthStrategyContext GetAuthStrategyContext(string username) { IAuthStrategy service = null; service = _normalAuthStrategy; service.User = _unitWork.FindSingle <User>(u => u.Account == username); return(new AuthStrategyContext(service)); }
public AuthStrategyContext GetAuthStrategyContext(string username) { IAuthStrategy service = null; if (username == "admin") { service = _systemAuth; } else { service = _normalAuthStrategy; service.User = _unitWork.FindSingle <User>(u => u.Account == username); } return(new AuthStrategyContext(service)); }
public AuthStrategyContext GetAuthStrategyContext(string username) { IAuthStrategy service = null; if (username == "System") { service = _systemAuth; } else { service = _normalAuthStrategy; service.User = _unitWork.FindSingle <UserInfo>(u => u.Id == username); } return(new AuthStrategyContext(service) { CommonUtil = CommonUtil }); }
public AuthStrategyContext GetAuthStrategyContext(string username) { IAuthStrategy service = null; service = _normalAuthStrategy; service.User = _unitWork.FindSingle <User>(u => u.Account == username); // if (username == "System") //{ // service= _systemAuth; //} //else //{ // service = _normalAuthStrategy; // service.User = _unitWork.FindSingle<User>(u => u.Account == username); //} return(new AuthStrategyContext(service)); }
public AuthStrategyContext GetAuthStrategyContext(string username) { if (string.IsNullOrEmpty(username)) { return(null); } IAuthStrategy service = null; if (username == Define.SYSTEM_USERNAME) { service = _systemAuth; } else { service = _normalAuthStrategy; service.User = _unitWork.FirstOrDefault <User>(u => u.Account == username); } return(new AuthStrategyContext(service)); }
public AuthStrategyContext(IAuthStrategy strategy) { this._strategy = strategy; }
public Principal(IAuthStrategy strategy) { _strategy = Assert.Argument(strategy, nameof(strategy)).NotNull().Value; _profileKey = "Qoden.Auth.Custodian.Profile"; _authOperation = new SingletonOperation <UserProfile>(RunFlow); }
public void setAuthStrategy(IAuthStrategy strategy) { this.strategy = strategy; }
public AuthProvider(IAuthStrategy strategy) { this.strategy = strategy; }