android-components / mozilla.components.service.sync.logins

Package mozilla.components.service.sync.logins


Name Summary
DefaultLoginValidationDelegate class DefaultLoginValidationDelegate : LoginValidationDelegate
A delegate that will check against storage to see if a given Login can be persisted, and return information about why it can or cannot.
GeckoLoginStorageDelegate class GeckoLoginStorageDelegate : LoginStorageDelegate
LoginStorageDelegate implementation.
SyncableLoginsStorage class SyncableLoginsStorage : LoginsStorage, SyncableStore, AutoCloseable
An implementation of LoginsStorage backed by application-services’ logins library. Synchronization support is provided both directly (via sync) when only syncing this storage layer, or via getHandle when syncing multiple stores. Use the latter in conjunction with FxaAccountManager.

Type Aliases

Name Summary
IdCollisionException typealias IdCollisionException = IdCollisionException
This is thrown if add() is given a record whose id is not blank, and collides with a record already known to the storage instance.
InvalidKeyException typealias InvalidKeyException = InvalidKeyException
This error is emitted in two cases:
InvalidRecordException typealias InvalidRecordException = InvalidRecordException
This is thrown on attempts to insert or update a record so that it is no longer valid, where “invalid” is defined as such:
LoginsStorageException typealias LoginsStorageException = LoginsStorageException
The base class of all errors emitted by logins storage.
MismatchedLockException typealias MismatchedLockException = MismatchedLockException
This is thrown if lock()/unlock() pairs don’t match up.
NoSuchRecordException typealias NoSuchRecordException = NoSuchRecordException
This is thrown if update() is performed with a record whose ID does not exist.
RequestFailedException typealias RequestFailedException = RequestFailedException
This error is emitted if a request to a sync server failed.
ServerPassword typealias ServerPassword = ServerPassword
Raw password data that is stored by the storage implementation.
SyncAuthInvalidException typealias SyncAuthInvalidException = SyncAuthInvalidException
This indicates that the authentication information (e.g. the SyncUnlockInfo) provided to AsyncLoginsStorage.sync is invalid. This often indicates that it’s stale and should be refreshed with FxA (however, care should be taken not to get into a loop refreshing this information).
SyncTelemetryPing typealias SyncTelemetryPing = SyncTelemetryPing
The telemetry ping from a successful sync
SyncUnlockInfo typealias SyncUnlockInfo = SyncUnlockInfo
This type contains the set of information required to successfully connect to the server and sync.

Extensions for External Classes

Name Summary


Name Summary
DB_NAME const val DB_NAME: String


Name Summary
into fun SyncAuthInfo.into(): SyncUnlockInfo
Conversion from a generic AuthInfo type into a type ‘logins’ lib uses at the interface boundary.
toServerPassword fun Login.toServerPassword(): ServerPassword
Converts an Android Components Login to an Application Services ServerPassword