Class MockCredentialStore
Credential-store mock with deterministic forced-status hooks.
Normal operations delegate to MemoryCredentialStore. Tests can force one
operation class to return statuses such as locked, unavailable, or
backendFailure without invoking the corresponding plaintext callback.
Constructors
| Name | Description |
|---|---|
this
(credentialNamespace)
|
Fields
| Name | Type | Description |
|---|---|---|
forcedRemoveStatus
|
CredentialStatus | |
forcedSaveStatus
|
CredentialStatus | |
forcedUpdateStatus
|
CredentialStatus | |
forcedWithSecretStatus
|
CredentialStatus |
Properties
| Name | Type | Description |
|---|---|---|
capabilities[get]
|
StoreCapabilities | Describe how this store behaves. |
credentialNamespace[get]
|
CredentialNamespace | Application namespace this store belongs to. |
Methods
| Name | Description |
|---|---|
clearAll
()
|
Promptly wipe all records retained by the underlying memory backend. |
remove
(handle)
|
Remove a saved credential. |
save
(secret, handle)
|
Save a new credential. |
update
(handle, replacement)
|
Replace the value of an existing credential. |
withSecret
(handle, callback)
|
Use a saved credential. |