@inrupt/solid-client / profile/jwks

Module: profile/jwks

Table of contents

Functions

Functions

addJwkToJwks

addJwkToJwks(jwk, jwksIri, options?): Promise<Jwks>

Fetch a JWKS at a given IRI, and add the given JWK to the obtained key set.

since 1.12.0

Parameters

Name

Type

Description

jwk

Jwk

The JWK to add to the set.

jwksIri

IriString

The IRI where the key set should be looked up.

options

Partial<typeof internal_defaultFetchOptions>

@param options Optional parameter options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API.

Returns

Promise<Jwks>

Promise resolving to a JWKS where the given key has been added.

Defined in

src/profile/jwks.ts:115


addPublicKeyToProfileJwks

addPublicKeyToProfileJwks(publicKey, webId, options?): Promise<Blob & WithResourceInfo>

Adds a public key to the JWKS listed in the profile associated to the given WebID. Retrieves the profile document for the specified WebID and looks up the associated JWKS. Having added the given key to the JWKS, this function overwrites the previous JWKS so that the new version is saved. This assumes the JWKS is hosted at a read-write IRI, such as in a Solid Pod.

since 1.12.0

Parameters

Name

Type

Description

publicKey

Jwk

The public key value to set.

webId

WebId

The WebID whose profile document references the key set to which we wish to add the specified public key.

options

Partial<typeof internal_defaultFetchOptions>

Optional parameter options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API.

Returns

Promise<Blob & WithResourceInfo>

Defined in

src/profile/jwks.ts:161


getProfileJwksIri

getProfileJwksIri(profileDocument, webId): UrlString | null

Look for a JWKS IRI optionally advertized from a profile document.

since 1.12.0

Parameters

Name

Type

Description

profileDocument

SolidDataset

The profile document.

webId

WebId

The WebID featured in the profile document.

Returns

UrlString | null

The JWKS IRI associated with the WebID, if any.

Defined in

src/profile/jwks.ts:92


setProfileJwks

setProfileJwks<Dataset>(profileDocument, webId, jwksIri): Dataset

Set a JWKS IRI associated with a WebID in a profile document.

since 1.12.0

Type parameters

Name

Type

Dataset

extends Readonly<Object>

Parameters

Name

Type

Description

profileDocument

Dataset

The profile document dataset.

webId

WebId

The WebID associated with the profile document.

jwksIri

Iri | IriString

The JWKS IRI to be set.

Returns

Dataset

A modified copy of the profile document, with the JWKS IRI set.

Defined in

src/profile/jwks.ts:69