Ejemplo n.º 1
0
 internal Factory(Groups groups, Favorites favorites, StoredCredentials credentials,
     PersistenceSecurity persistenceSecurity, DataDispatcher dispatcher)
 {
     this.groups = groups;
     this.favorites = favorites;
     this.credentials = credentials;
     this.persistenceSecurity = persistenceSecurity;
     this.dispatcher = dispatcher;
 }
Ejemplo n.º 2
0
        public void UpdatePasswordsByNewMasterPassword(string newMasterKey)
        {
            // nothing to do in database, the application master password doesn't affect the database
            // but, the file persisted passwords may be lost, so we have to update them.
            var newSecurity     = new PersistenceSecurity(this.security);
            var filePersistence = new FilePersistence(newSecurity, this.favoriteIcons, this.connectionManager);

            filePersistence.Initialize();
            filePersistence.UpdatePasswordsByNewMasterPassword(newMasterKey);
        }
Ejemplo n.º 3
0
 internal static DbFavorite CreateFavorite(PersistenceSecurity persistenceSecurity, Groups groups,
     StoredCredentials credentials, DataDispatcher dispatcher)
 {
     var favorite = new DbFavorite();
     favorite.Display = new DbDisplayOptions();
     favorite.Security = new DbSecurityOptions();
     favorite.ExecuteBeforeConnect = new DbBeforeConnectExecute();
     favorite.AssignStores(groups, credentials, persistenceSecurity, dispatcher);
     favorite.MarkAsNewlyCreated();
     return favorite;
 }
Ejemplo n.º 4
0
 internal GuardedCredential(ICredentialBase credential, PersistenceSecurity persistenceSecurity)
 {
     this.credential          = credential;
     this.PersistenceSecurity = persistenceSecurity;
 }
 internal FavoriteConfigurationSecurity(IPersistence persistence, FavoriteConfigurationElement favorite)
 {
     this.security    = persistence.Security;
     this.credentials = persistence.Credentials;
     this.favorite    = favorite;
 }
 internal void UpdateFrom(DbSecurityOptions source)
 {
     this.EncryptedUserName = source.EncryptedUserName;
     this.EncryptedDomain = source.EncryptedDomain;
     this.EncryptedPassword = source.EncryptedPassword;
     this.credentialId = source.credentialId;
     this.storedCredentials = source.storedCredentials;
     this.persistenceSecurity = source.persistenceSecurity;
 }
 internal void AssignStores(StoredCredentials storedCredentials, PersistenceSecurity persistenceSecurity)
 {
     this.storedCredentials = storedCredentials;
     this.persistenceSecurity = persistenceSecurity;
 }
 internal void AssignSecurity(PersistenceSecurity persistenceSecurity)
 {
     this.persistenceSecurity = persistenceSecurity;
 }
 public void UpdatePasswordsByNewMasterPassword(string newMasterKey)
 {
     // nothing to do in database, the application master password doesn't affect the database
     // but, the file persisted passwords may be lost, so we have to update them
     var newSecurity = new PersistenceSecurity(this.security);
     var filePersistence = new FilePersistence(newSecurity);
     filePersistence.Initialize();
     filePersistence.UpdatePasswordsByNewMasterPassword(newMasterKey);
 }