Interface ClientCredentialsStore

Stores and creates ClientCredentials.

interface ClientCredentialsStore {
    create: ((label: string, webId: string, accountId: string) => Promise<ClientCredentials>);
    delete: ((id: string) => Promise<void>);
    findByAccount: ((accountId: string) => Promise<ClientCredentials[]>);
    findByLabel: ((label: string) => Promise<undefined | ClientCredentials>);
    get: ((id: string) => Promise<undefined | ClientCredentials>);
}

Implemented by

Properties

create: ((label: string, webId: string, accountId: string) => Promise<ClientCredentials>)

Creates new token.

Type declaration

    • (label, webId, accountId): Promise<ClientCredentials>
    • Parameters

      • label: string

        Identifier to use for the new token.

      • webId: string

        WebID to identify as when using this token.

      • accountId: string

      Returns Promise<ClientCredentials>

delete: ((id: string) => Promise<void>)

Deletes the token with the given ID.

Type declaration

    • (id): Promise<void>
    • Parameters

      • id: string

        ID of the token.

      Returns Promise<void>

findByAccount: ((accountId: string) => Promise<ClientCredentials[]>)

Find all tokens created by the given account.

Type declaration

findByLabel: ((label: string) => Promise<undefined | ClientCredentials>)

Find the ClientCredentials with the given label.

Type declaration

get: ((id: string) => Promise<undefined | ClientCredentials>)

Find the ClientCredentials with the given ID.

Type declaration