Beispiel #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="mapService"></param>
 /// <param name="service"></param>
 /// <param name="logger"></param>
 /// <param name="loginLogService"></param>
 public AuthController(IMapperService mapService, IAuthService service, ILogger <AuthController> logger, ILoginLogService loginLogService)
 {
     _service         = service;
     _logger          = logger;
     _loginLogService = loginLogService;
     _mapService      = mapService;
 }
Beispiel #2
0
        public override void Init()
        {
            base.Init();
            _recaptchaService    = App.GetService <IRecaptchaService>();
            _loginLog            = App.GetService <ILoginLogService>();
            _sessionService      = App.GetService <IUserSessionService>();
            _incidentLog         = App.GetService <IIncidentLogService>();
            _notificationService = App.GetService <INotificationService>();
            // automatically create notification service if it is not found - to ease upgrading after refactoring that introduced this service (Feb 2016)
            if (_notificationService == null)
            {
                _notificationService = NotificationService.Create(App);
            }
            // Password checker
            if (_settings.PasswordChecker == null)
            {
                _settings.PasswordChecker = new PasswordStrengthChecker(App);
            }
            IEncryptionService encrService = App.GetService <IEncryptionService>();

            Util.Check(encrService != null, "Failed to get encryption service.");
            if (!string.IsNullOrWhiteSpace(_settings.EncryptionChannelName))
            {
                Util.Check(encrService.IsRegistered(_settings.EncryptionChannelName),
                           "Encryption channel '{0}' for LoginModule is not registered in EncryptedDataModule.");
            }
            //Login failed trigger
            if (_incidentLog != null && _settings.LoginFailedTriggerSettings != null)
            {
                var trigger = new LoginFailedTrigger(App, _settings.LoginFailedTriggerSettings);
                _incidentLog.AddTrigger(trigger);
            }
        }
Beispiel #3
0
 public UserService(ILoginLogService login_log_service, IRepository <User> repository, IRoleService role_service, INavigateService navigate_service)
 {
     loginLogService       = login_log_service;
     this.repository       = repository;
     this.role_service     = role_service;
     this.navigate_service = navigate_service;
 }
Beispiel #4
0
 public WelcomeController(IArticleService Articledb, IUserService Userdb, ILoginLogService LoginLogdb, IExceptionLogService ExLogdb, IAdvertService Advertdb)
 {
     this.Articledb  = Articledb;
     this.Userdb     = Userdb;
     this.LoginLogdb = LoginLogdb;
     this.ExLogdb    = ExLogdb;
     this.Advertdb   = Advertdb;
 }
 public AccountController(IUserModelService userService,
                          IFormsAuthentication formsAuthService,
                          ILoginLogService logService)
 {
     this._userService      = userService;
     this._logService       = logService;
     this._formsAuthService = formsAuthService;
 }
Beispiel #6
0
 public AccountController(
     IUserService user,
     ILoginLogService loginlog,
     LoginStatus logincontext)
 {
     this._IUserService     = user;
     this._LoginErrorLogBll = loginlog;
     this._LoginStatus      = logincontext;
 }
Beispiel #7
0
 public AuthController(IAuthService authService, ILoginLogService loginLogService, ILoginInfo loginInfo, IJwtHandler jwtHandler, WebConfigModel webConfigModel, IHttpContextAccessor accessor)
 {
     _authService     = authService;
     _loginLogService = loginLogService;
     _loginInfo       = loginInfo;
     _jwtHandler      = jwtHandler;
     _webConfigModel  = webConfigModel;
     _accessor        = accessor;
 }
 public AuthController(
     IUserToken userToken,
     IAuthService authServices,
     ILoginLogService loginLogService
     )
 {
     _userToken       = userToken;
     _authService     = authServices;
     _loginLogService = loginLogService;
 }
Beispiel #9
0
        public LoggingEntityApp(string schema = "log", LogModules includeModules = LogModules.All,
                                UserSessionSettings sessionSettings = null) : base("LoggingApp", CurrentVersion)
        {
            var area = base.AddArea(schema);

            ActiveModules = includeModules;
            // DbInfo module is not shared with main app, it is local for the database
            var dbInfo = new DbInfoModule(area);

            // ErrorLog is property in EntityApp, will be set there automatically
            if (ActiveModules.IsSet(LogModules.ErrorLog))
            {
                var errLog = new ErrorLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.OperationLog))
            {
                OperationLog = new OperationLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.IncidentLog))
            {
                IncidentLog = new IncidentLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.TransactionLog))
            {
                TransactionLog = new TransactionLogModule(area, trackHostApp: false); //do not track changes for LoggingApp itself
            }
            if (ActiveModules.IsSet(LogModules.NotificationLog))
            {
                NotificationLog = new NotificationLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.LoginLog))
            {
                LoginLog = new LoginLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.DbUpgradeLog))
            {
                DbUpgradeLog = new DbUpgradeLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.UserSession))
            {
                SessionService = new UserSessionModule(area, sessionSettings);
            }
            if (ActiveModules.IsSet(LogModules.EventLog))
            {
                EventLogService = new EventLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.WebCallLog))
            {
                WebCallLog = new WebCallLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.WebClientLog))
            {
                WebClientLogService = new WebClientLogModule(area);
            }
        }
Beispiel #10
0
 public LoggingEntityApp(string schema = "log", UserSessionSettings sessionSettings = null)
     : base("LoggingApp", CurrentVersion)
 {
     var area = base.AddArea(schema);
       var errorLog = new ErrorLogModule(area);
       OperationLog = new OperationLogModule(area);
       IncidentLog = new IncidentLogModule(area);
       TransactionLog = _transactionLogModule = new TransactionLogModule(area);
       WebCallLog = new WebCallLogModule(area);
       NotificationLog = new NotificationLogModule(area);
       LoginLog = new LoginLogModule(area);
       DbModelChangeLog = new DbUpgradeLogModule(area);
       SessionService = new UserSessionModule(area, sessionSettings);
       DbInfoService = new DbInfoModule(area);
       EventLogService = new EventLogModule(area);
 }
Beispiel #11
0
 public AccountController(
     IAuthLoginService _IAuthLoginService,
     IUserService user,
     ILoginLogService loginlog,
     LoginStatus logincontext,
     IRepository <AuthScope> _AuthScopeRepository,
     IAuthTokenService _IAuthTokenService,
     IValidationDataProvider _IValidationDataProvider)
 {
     this._IAuthLoginService       = _IAuthLoginService;
     this._IUserService            = user;
     this._LoginErrorLogBll        = loginlog;
     this._LoginStatus             = logincontext;
     this._AuthScopeRepository     = _AuthScopeRepository;
     this._IAuthTokenService       = _IAuthTokenService;
     this._IValidationDataProvider = _IValidationDataProvider;
 }
Beispiel #12
0
 public override void Init()
 {
     base.Init();
       _recaptchaService = App.GetService<IRecaptchaService>();
       _loginLog = App.GetService<ILoginLogService>();
       _sessionService = App.GetService<IUserSessionService>();
       _incidentLog = App.GetService<IIncidentLogService>();
       _notificationService = App.GetService<INotificationService>();
       // automatically create notification service if it is not found - to ease upgrading after refactoring that introduced this service (Feb 2016)
       if (_notificationService == null)
     _notificationService = NotificationService.Create(App);
       // Password checker
       if(_settings.PasswordChecker == null)
     _settings.PasswordChecker = new PasswordStrengthChecker(App);
       IEncryptionService encrService = App.GetService<IEncryptionService>();
       Util.Check(encrService != null, "Failed to get encryption service."); //never happens, module requires EncryptedDataModule
       if (!string.IsNullOrWhiteSpace(_settings.EncryptionChannelName))
     Util.Check(encrService.IsRegistered(_settings.EncryptionChannelName),
       "Encryption channel '{0}' for LoginModule is not registered in EncryptedDataModule.");
       //Login failed trigger
       if(_incidentLog != null && _settings.LoginFailedTriggerSettings != null) {
     var trigger = new LoginFailedTrigger(App, _settings.LoginFailedTriggerSettings);
     _incidentLog.AddTrigger(trigger);
       }
 }
 public LoginConfirmationController(ILoginLogService loginLogService, IWeChatUserService weChatUserService)
 {
     _loginLogService   = loginLogService;
     _weChatUserService = weChatUserService;
 }
 public LoginLogController(ILoginInfo loginInfo, ILoginLogService LoginLogService)
 {
     _service = LoginLogService;
 }
Beispiel #15
0
 public loginController(IMemberService memberService, ILoginLogService loginLogService, IEmailLogService emailLogService)
 {
     _memberService   = memberService;
     _loginLogService = loginLogService;
     _emailLogService = emailLogService;
 }
 public LoginConfirmationController(ILoginLogService loginLogService, IWeChatUserService weChatUserService)
 {
     _loginLogService = loginLogService;
     _weChatUserService = weChatUserService;
 }
Beispiel #17
0
 public AccountController(IUserService userService, ILoginLogService loginLogService, IMediaService mediaService)
 {
     this._userService     = userService;
     this._loginLogService = loginLogService;
     this._mediaService    = mediaService;
 }
 public LogManageController(ILoginLogService loginLogService)
 {
     _loginLogService = loginLogService;
 }
Beispiel #19
0
 public CometController(ILoginLogService loginLogService)
 {
     _loginLogService = loginLogService;
 }
 public adminloginController(ISysUserService sysUserService, ILoginLogService loginLogService)
 {
     _sysUserService  = sysUserService;
     _loginLogService = loginLogService;
 }
Beispiel #21
0
 public LoginLogController(ILoginLogService loginLogService)
 {
     this._loginLogService = loginLogService;
 }
Beispiel #22
0
 public CometController(ILoginLogService loginLogService)
 {
     _loginLogService = loginLogService;
 }