public AuthController(IAuthService authService, IUserService userService, IAccountService accountService, IAuthStorage authStorage, IStringLocalizer <AppResources> stringLocalizer) { _authService = authService ?? throw new ArgumentNullException(nameof(authService)); _userService = userService ?? throw new ArgumentNullException(nameof(userService)); _accountService = accountService ?? throw new ArgumentNullException(nameof(accountService)); _authStorage = authStorage; _stringLocalizer = stringLocalizer; }
public AccountService( IDinnerPrincipalProvider principalProvider, IAuthStorage authStorage, IPasswordHashProvider passwordHashProvider, IUserDinnerStorage userDinnerStorage, IRandomStringGenerator stringGenerator, IEmailSystem emailSystem) { this.principalProvider = principalProvider; this.authStorage = authStorage; this.passwordHashProvider = passwordHashProvider; this.userDinnerStorage = userDinnerStorage; this.stringGenerator = stringGenerator; this.emailSystem = emailSystem; }
public AuthWindow() { InitializeComponent(); _default = GuestButton.Background; try { accountManager = new LocalAccountManager(Properties.Settings.Default.AuthStorage); } catch { new MessageBlock("Can't connect to datastore") { WindowStartupLocation = WindowStartupLocation.CenterScreen }.ShowDialog(); this.Close(); } }
public AuthService(IAuthStorage authStorage) { _authStorage = authStorage ?? throw new ArgumentNullException(nameof(authStorage)); }
public Authorization(IAuthStorage storage) { _storage = storage; _isClient = false; _sessions = new Dictionary <Token, AuthSession>(); }
public RegisterWindow() { InitializeComponent(); accountManager = new LocalAccountManager(Properties.Settings.Default.AuthStorage); }
/// <summary> /// Initializes a new instance of the <see cref="SecurityService" /> class. /// </summary> /// <param name="authStorage">The authentication storage.</param> /// <param name="passwordHashProvider">The password hash provider.</param> /// <param name="eventLog">The event log.</param> public SecurityService(IAuthStorage authStorage, IPasswordHashProvider passwordHashProvider, IEventLog eventLog) { this.authStorage = authStorage; this.passwordHashProvider = passwordHashProvider; this.eventLog = eventLog; }