Skip to content

MemoryCredentialStorage

Defined in: src/client/memory-credential-storage.ts:15

Credentials held for the lifetime of the instance and shared with nothing.

For tests and for environments with neither IndexedDB nor localStorage. A reload starts from nothing, and other tabs see nothing, so every tab of an origin is alone.

Records are handed back as they were given rather than round-tripped through an encoding, which is what lets this hold a non-extractable key at all.

implements CredentialStorage

new MemoryCredentialStorage(): MemoryCredentialStorage

MemoryCredentialStorage

readonly durable: false = false

Defined in: src/client/memory-credential-storage.ts:17

Whether what this writes survives the document being torn down.

CredentialStorage.durable


readonly shared: false = false

Defined in: src/client/memory-credential-storage.ts:16

Whether another tab of this origin reads what this writes.

CredentialStorage.shared

create(): Promise<ECDSAKeyIdentity>

Defined in: src/client/memory-credential-storage.ts:23

A fresh identity of this store’s own type, not persisted.

Generation belongs to the store because the medium decides the key type: one that has to serialise needs a key whose private bytes are readable, and one that does not should not have them. Kept together so an application cannot pair a non-extractable key with a store that cannot hold one and find out at runtime.

Promise<ECDSAKeyIdentity>

CredentialStorage.create


get(slot): Promise<Credential<ECDSAKeyIdentity> | null>

Defined in: src/client/memory-credential-storage.ts:28

The credential stored under slot, or null where there is none.

string

Promise<Credential<ECDSAKeyIdentity> | null>

CredentialStorage.get


remove(slot): Promise<void>

Defined in: src/client/memory-credential-storage.ts:37

string

Promise<void>

CredentialStorage.remove


set(slot, credential): Promise<void>

Defined in: src/client/memory-credential-storage.ts:32

string

Credential<ECDSAKeyIdentity>

Promise<void>

CredentialStorage.set