private void View_ChangedPasswordEvent() { if (_options.keychain() && _options.password()) { if (Utils.IsBlank(_host.getHostname())) { return; } if (Utils.IsBlank(_host.getCredentials().getUsername())) { return; } if (Utils.IsBlank(View.Password)) { return; } try { PasswordStoreFactory.get().addPassword(_host.getProtocol().getScheme(), _host.getPort(), _host.getHostname(), _host.getCredentials().getUsername(), View.Password ); } catch (LocalAccessDeniedException e) { Log.error($"Failure saving credentials for ${_host} in keychain. ${e.getDetail()}"); } } }
public void ReadPasswordFromKeychain() { if (_options.keychain()) { if (string.IsNullOrEmpty(View.Hostname)) { return; } if (string.IsNullOrEmpty(View.Port)) { return; } if (string.IsNullOrEmpty(View.Username)) { return; } Protocol protocol = View.SelectedProtocol; string password = PasswordStoreFactory.get().getPassword(protocol.getScheme(), Integer.parseInt(View.Port), View.Hostname, View.Username); if (Utils.IsNotBlank(password)) { View.Password = password; } } }
public InnerCreateVaultWorker(BrowserController controller, Path folder, String filename, String region, String passphrase) : base(region, new VaultCredentials(passphrase), PasswordStoreFactory.get(), VaultFactory.get(folder, DefaultVaultRegistry.DEFAULT_MASTERKEY_FILE_NAME, DefaultVaultRegistry.DEFAULT_PEPPER)) { _controller = controller; _folder = folder; _filename = filename; }
public AuthService(DataContext dataContext, IPasswordStore passwordStore, NotebookService notebookService, ConfigFileService configFileService, IDistributedIdGenerator idGenerator, PasswordStoreFactory passwordStoreFactory) { this.idGenerator = idGenerator; this.dataContext = dataContext; this.passwordStore = passwordStore; this.NotebookService = notebookService; this.config = configFileService.WebConfig; this.passwordStoreFactory = passwordStoreFactory; }
public InnerCreateVaultWorker(BrowserController controller, Path folder, String filename, String region, String passphrase) : base(region, new VaultCredentials(passphrase), PasswordStoreFactory.get(), VaultFactory.get(folder, new HostPreferences(controller.Session.getHost()).getProperty("cryptomator.vault.masterkey.filename"), Encoding.UTF8.GetBytes(new HostPreferences(controller.Session.getHost()).getProperty("cryptomator.vault.pepper")))) { _controller = controller; _folder = folder; _filename = filename; }
public RealNameService(DataContext dataContext, IDistributedIdGenerator idGenerator, ConfigFileService configFileService, PasswordStoreFactory passwordStoreFactory, ILoggingService logging, ICryptographyProvider cryptographyProvider) { this.idGenerator = idGenerator; this.dataContext = dataContext; this.Config = configFileService.WebConfig; this.passwordStoreFactory = passwordStoreFactory; this.cryptographyProvider = cryptographyProvider; this.logging = logging; }
public InnerCreateVaultWorker(BrowserController controller, Path folder, String filename, String region, String passphrase) : base(region, new VaultCredentials(passphrase), VaultFactory.get(folder, PasswordStoreFactory.get())) { _controller = controller; _folder = folder; _filename = filename; }