RustLogins.sys.mjs

class RustLogins.sys.AuthenticationCanceled()

authentication has been cancelled.

class RustLogins.sys.AuthenticationError()

error during authentication (in PrimaryPasswordAuthenticator)

class RustLogins.sys.BulkResultEntry()

A bulk insert result entry, returned by add_many and add_many_with_meta

RustLogins.sys.BulkResultEntry.Error
RustLogins.sys.BulkResultEntry.Success
class RustLogins.sys.DecryptionFailed()

decryption failed

class RustLogins.sys.EncryptionFailed()

encryption failed

class RustLogins.sys.Interrupted()

An operation was interrupted at the request of the consuming app.

class RustLogins.sys.InvalidKey()

Encryption key is not valid.

class RustLogins.sys.InvalidRecord()

The login data supplied is invalid. The reason will indicate what’s wrong with it.

class RustLogins.sys.Login()

A login stored in the database

RustLogins.sys.Login.formActionOrigin

type: string

RustLogins.sys.Login.httpRealm

type: string

RustLogins.sys.Login.id

type: string

RustLogins.sys.Login.origin

type: string

RustLogins.sys.Login.password

type: string

RustLogins.sys.Login.passwordField

type: string

RustLogins.sys.Login.timeCreated

type: number

RustLogins.sys.Login.timeLastBreachAlertDismissed

type: number

RustLogins.sys.Login.timeLastUsed

type: number

RustLogins.sys.Login.timePasswordChanged

type: number

RustLogins.sys.Login.timesUsed

type: number

RustLogins.sys.Login.username

type: string

RustLogins.sys.Login.usernameField

type: string

class RustLogins.sys.LoginCandidate()

A login stored in the database, minus the encrypted fields.

Reading these never needs the encryption key, so consumers which filter on the cleartext fields can do so without forcing the user to authenticate. See list_candidates().

RustLogins.sys.LoginCandidate.formActionOrigin

type: string

RustLogins.sys.LoginCandidate.httpRealm

type: string

RustLogins.sys.LoginCandidate.id

type: string

RustLogins.sys.LoginCandidate.origin

type: string

RustLogins.sys.LoginCandidate.passwordField

type: string

RustLogins.sys.LoginCandidate.timeCreated

type: number

RustLogins.sys.LoginCandidate.timeLastBreachAlertDismissed

type: number

RustLogins.sys.LoginCandidate.timeLastUsed

type: number

RustLogins.sys.LoginCandidate.timePasswordChanged

type: number

RustLogins.sys.LoginCandidate.timesUsed

type: number

RustLogins.sys.LoginCandidate.usernameField

type: string

class RustLogins.sys.LoginEntry()

A login entry from the user, not linked to any database record. The add/update APIs input these.

RustLogins.sys.LoginEntry.formActionOrigin

type: string

RustLogins.sys.LoginEntry.httpRealm

type: string

RustLogins.sys.LoginEntry.origin

type: string

RustLogins.sys.LoginEntry.password

type: string

RustLogins.sys.LoginEntry.passwordField

type: string

RustLogins.sys.LoginEntry.username

type: string

RustLogins.sys.LoginEntry.usernameField

type: string

class RustLogins.sys.LoginEntryWithMeta()

A login together with record fields, handed over to the store API; ie a login persisted elsewhere, useful for migrations

RustLogins.sys.LoginEntryWithMeta.entry

type: LoginEntry

RustLogins.sys.LoginEntryWithMeta.meta

type: LoginMeta

class RustLogins.sys.LoginMeta()

Metadata fields managed internally by the library. These are automatically set on add() and updated on operations like touch() and update(). Not included in LoginEntry; use add_with_meta() when importing records with existing metadata.

RustLogins.sys.LoginMeta.id

type: string

RustLogins.sys.LoginMeta.timeCreated

type: number

RustLogins.sys.LoginMeta.timeLastBreachAlertDismissed

type: number

RustLogins.sys.LoginMeta.timeLastUsed

type: number

RustLogins.sys.LoginMeta.timePasswordChanged

type: number

RustLogins.sys.LoginMeta.timesUsed

type: number

class RustLogins.sys.LoginsApiError()

These are the errors returned by our public API.

class RustLogins.sys.LoginsBridgedEngine()

The Desktop-facing bridged sync engine - a thin wrapper over the sync15::engine::SyncEngine implemented by this component (see sync15::engine::BridgedEngineWrapper). It’s only actually used on Desktop, but it’s fine to expose this everywhere. NOTE: all timestamps here are milliseconds.

RustLogins.sys.LoginsBridgedEngine.apply(serverModifiedMillis)

apply

Arguments:
  • serverModifiedMillis (number)

Returns:

Promise.<Array.<string>> – }

RustLogins.sys.LoginsBridgedEngine.ensureCurrentSyncId(newSyncId)

ensureCurrentSyncId

Arguments:
  • newSyncId (string)

Returns:

Promise.<string> – }

RustLogins.sys.LoginsBridgedEngine.lastSync()

lastSync

Returns:

Promise.<number> – }

RustLogins.sys.LoginsBridgedEngine.reset()

reset

RustLogins.sys.LoginsBridgedEngine.resetLastSync()

resetLastSync

RustLogins.sys.LoginsBridgedEngine.resetSyncId()

resetSyncId

Returns:

Promise.<string> – }

RustLogins.sys.LoginsBridgedEngine.setUploaded(newTimestamp, uploadedIds)

setUploaded

Arguments:
  • newTimestamp (number)

  • uploadedIds (Array.<string>)

RustLogins.sys.LoginsBridgedEngine.storeIncoming(incomingEnvelopesAsJson)

storeIncoming

Arguments:
  • incomingEnvelopesAsJson (Array.<string>)

RustLogins.sys.LoginsBridgedEngine.syncFinished()

syncFinished

RustLogins.sys.LoginsBridgedEngine.syncId()

syncId

Returns:

Promise.<?string> – }

RustLogins.sys.LoginsBridgedEngine.syncStarted()

syncStarted

RustLogins.sys.LoginsBridgedEngine.wipe()

wipe

class RustLogins.sys.LoginsDeletionMetrics()

Metrics tracking deletion of logins that cannot be decrypted, see delete_undecryptable_records_for_remote_replacement for more details

RustLogins.sys.LoginsDeletionMetrics.localDeleted

type: number

RustLogins.sys.LoginsDeletionMetrics.mirrorDeleted

type: number

class RustLogins.sys.MissingKey()

Encryption key is missing.

class RustLogins.sys.NoSuchRecord()

Asking to do something with a guid which doesn’t exist.

class RustLogins.sys.NssAuthenticationError()

NSS error during authentication

class RustLogins.sys.NssUninitialized()

NSS not initialized.

class RustLogins.sys.UnexpectedLoginsApiError()

something internal went wrong which doesn’t have a public error value because the consuming app can not reasonably take any action to resolve it. The underlying error will have been logged and reported. (ideally would just be Unexpected, but that would be a breaking change)

RustLogins.sys.createLoginStoreWithNssKeymanager(path, primaryPasswordAuthenticator)

createLoginStoreWithNssKeymanager

Arguments:
  • path (string)

  • primaryPasswordAuthenticator (PrimaryPasswordAuthenticator)

Returns:

Promise.<LoginStore> – }

RustLogins.sys.createLoginStoreWithStaticKeyManager(path, key)

Create a LoginStore with StaticKeyManager by passing in a db path and a static key

Arguments:
  • path (string)

  • key (string)

Returns:

Promise.<LoginStore> – }

RustLogins.sys.createManagedEncdec(keyManager)

Similar to create_static_key_manager above, create a ManagedEncryptorDecryptor by passing in a KeyManager

Arguments:
  • keyManager (KeyManager)

Returns:

Promise.<EncryptorDecryptor> – }

RustLogins.sys.createStaticKeyManager(key)

We expose the crypto primitives on the namespace Utility function to create a StaticKeyManager to be used for the time being until support lands for [trait implementation of an UniFFI interface](https://mozilla.github.io/uniffi-rs/next/proc_macro/index.html#structs-implementing-traits) in UniFFI.

Arguments:
  • key (string)

Returns:

Promise.<KeyManager> – }