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
Implements
Section titled “Implements”CredentialStorage<ECDSAKeyIdentity>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MemoryCredentialStorage():
MemoryCredentialStorage
Returns
Section titled “Returns”MemoryCredentialStorage
Properties
Section titled “Properties”durable
Section titled “durable”
readonlydurable:false=false
Defined in: src/client/memory-credential-storage.ts:17
Whether what this writes survives the document being torn down.
Implementation of
Section titled “Implementation of”shared
Section titled “shared”
readonlyshared:false=false
Defined in: src/client/memory-credential-storage.ts:16
Whether another tab of this origin reads what this writes.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”create()
Section titled “create()”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.
Returns
Section titled “Returns”Promise<ECDSAKeyIdentity>
Implementation of
Section titled “Implementation of”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Credential<ECDSAKeyIdentity> | null>
Implementation of
Section titled “Implementation of”remove()
Section titled “remove()”remove(
slot):Promise<void>
Defined in: src/client/memory-credential-storage.ts:37
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”set(
slot,credential):Promise<void>
Defined in: src/client/memory-credential-storage.ts:32
Parameters
Section titled “Parameters”string
credential
Section titled “credential”Credential<ECDSAKeyIdentity>
Returns
Section titled “Returns”Promise<void>