Skip to content

@graphty/graphty-element / index / CredentialStore

Interface: CredentialStore ​

Defined in: graphty-element/src/credentials/CredentialStore.ts:84

The credentials a reader asked to remember: AI keys and network-source credentials. Experimental.

Accessors ​

ai ​

Get Signature ​

get ai(): ApiKeyManager | null

Defined in: graphty-element/src/credentials/CredentialStore.ts:140

The ai namespace: the AI provider key manager, with its persistence switches. Null until it has loaded, and when it cannot (the optional encrypt-storage peer is missing).

Returns ​

ApiKeyManager | null

the manager, or null

Methods ​

forget() ​

forget(target): Promise<void>

Defined in: graphty-element/src/credentials/CredentialStore.ts:191

Forget the credentials remembered for a source at an endpoint's origin.

Parameters ​

target ​

SourceCredentialTarget

the source and the endpoint

Returns ​

Promise<void>


forgetAll() ​

forgetAll(): Promise<void>

Defined in: graphty-element/src/credentials/CredentialStore.ts:223

Forget every AI key and every source credential, in memory and on this device.

Returns ​

Promise<void>


list() ​

list(): readonly StoredCredentialInfo[]

Defined in: graphty-element/src/credentials/CredentialStore.ts:207

Everything remembered, never a secret: the AI providers with a key, then the source credentials.

Returns ​

readonly StoredCredentialInfo[]

one entry per credential


lookup() ​

lookup(source, origin): Promise<Credential | undefined>

Defined in: graphty-element/src/credentials/CredentialStore.ts:175

The remembered credential for a source and the origin about to be contacted.

Parameters ​

source ​

string

the source id

origin ​

string | URL

the origin, or any URL on it

Returns ​

Promise<Credential | undefined>

the credential, bound to that origin only, or undefined


remember() ​

remember(target, credential): Promise<void>

Defined in: graphty-element/src/credentials/CredentialStore.ts:152

Remember a network-source credential for a source at an endpoint's origin. Kept in memory, and on this device when the AI key manager's persistence is on.

Parameters ​

target ​

SourceCredentialTarget

the source and the endpoint

credential ​

Credential

from the credentials factories

Returns ​

Promise<void>

Throws ​

A GraphtyError with E_CREDENTIAL_NOT_STORABLE ({ kind }) for a token function, an AWS provider or a custom credential.