LoginStore
open class LoginStore : LoginStoreProtocol, @unchecked Sendable
-
Declaration
Swift
required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer)
-
Declaration
Swift
public convenience init(path: String, encdec: EncryptorDecryptor) throws
-
Declaration
Swift
open func add(login: LoginEntry) throws -> Login
-
Declaration
Swift
open func addMany(logins: [LoginEntry]) throws -> [BulkResultEntry]
-
Declaration
Swift
open func addManyWithMeta(entriesWithMeta: [LoginEntryWithMeta]) throws -> [BulkResultEntry]
-
Declaration
Swift
open func addOrUpdate(login: LoginEntry) throws -> Login
-
Declaration
Swift
open func addWithMeta(entryWithMeta: LoginEntryWithMeta) throws -> Login
-
Declaration
Swift
open func count() throws -> Int64
-
Declaration
Swift
open func countByFormActionOrigin(formActionOrigin: String) throws -> Int64
-
Declaration
Swift
open func countByOrigin(origin: String) throws -> Int64
-
Declaration
Swift
open func delete(id: String) throws -> Bool
-
Declaration
Swift
open func deleteMany(ids: [String]) throws -> [Bool]
-
The
delete_undecryptable_records_for_remote_replacement
function locally deletes stored logins that cannot be decrypted and sets the last sync time to 0 so any existing server records can be downloaded and overwrite the locally deleted records.NB: This function was created to unblock iOS logins users who are unable to sync logins and should not be used outside of this use case.
Declaration
Swift
open func deleteUndecryptableRecordsForRemoteReplacement() throws -> LoginsDeletionMetrics
-
Declaration
Swift
open func findLoginToUpdate(look: LoginEntry) throws -> Login?
-
Declaration
Swift
open func get(id: String) throws -> Login?
-
Declaration
Swift
open func getByBaseDomain(baseDomain: String) throws -> [Login]
-
Declaration
Swift
open func getCheckpoint() throws -> String?
-
Declaration
Swift
open func hasLoginsByBaseDomain(baseDomain: String) throws -> Bool
-
Declaration
Swift
open func isEmpty() throws -> Bool
-
Declaration
Swift
open func list() throws -> [Login]
-
Declaration
Swift
open func registerWithSyncManager()
-
Declaration
Swift
open func reset() throws
-
Run maintenance on the DB
This is intended to be run during idle time and will take steps / to clean up / shrink the database.
Declaration
Swift
open func runMaintenance() throws
-
Declaration
Swift
open func setCheckpoint(checkpoint: String) throws
-
Declaration
Swift
open func shutdown()
-
Declaration
Swift
open func touch(id: String) throws
-
Declaration
Swift
open func update(id: String, login: LoginEntry) throws -> Login
-
Clear out locally stored logins data
If sync is enabled, then we will try to recover the data on the next sync.
The main reason to call this is when regenerating a new encryption key. In that case, there’s no reason to keep around the local data since it can’t be decrypted. Calling
wipe_local
is better than keeping around these un-decryptable logins, since we might be able to recover the data via sync.This is a no-op for freshly created databases, so it’s safe to call this whenever a key is generated.
Declaration
Swift
open func wipeLocal() throws