@inrupt/solid-client / profile/jwks
Module: profile/jwks#
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.
Parameters#
Name |
Type |
Description |
---|---|---|
|
The JWK to add to the set. |
|
|
|
The IRI where the key set should be looked up. |
|
|
|
|
( |
Returns#
Promise
<Jwks
>
Promise resolving to a JWKS where the given key has been added.
Since
1.12.0
Defined in#
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.
Parameters#
Name |
Type |
Description |
---|---|---|
|
The public key value to set. |
|
|
|
The WebID whose profile document references the key set to which we wish to add the specified public key. |
|
|
Optional parameter |
|
( |
Returns#
Promise
<Blob
& WithResourceInfo
>
Since
1.12.0
Defined in#
getProfileJwksIri#
▸ getProfileJwksIri(profileDocument
, webId
): UrlString
| null
Look for a JWKS IRI optionally advertized from a profile document.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The profile document. |
|
|
The WebID featured in the profile document. |
Returns#
UrlString
| null
The JWKS IRI associated with the WebID, if any.
Since
1.12.0
Defined in#
setProfileJwks#
▸ setProfileJwks<Dataset
>(profileDocument
, webId
, jwksIri
): Dataset
Set a JWKS IRI associated with a WebID in a profile document.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The profile document dataset. |
|
|
The WebID associated with the profile document. |
|
|
The JWKS IRI to be set. |
Returns#
Dataset
A modified copy of the profile document, with the JWKS IRI set.
Since
1.12.0