Options
All
  • Public
  • Public/Protected
  • All
Menu

Module idp

SolidLabLib.js - IDP

Build status Coverage Status npm version

A library of helper functions for developing Solid apps in TypeScript/JavaScript.

This package contains helper functions related to the Solid identity provider (a.k.a. OIDC issuer).

Requirements

Installation

$ npm install @solidlab/idp

or

$ yarn add @solidlab/idp

Usage

Obtain the identity provider

The identity provider of a WebID can be determined as follows:

import { getIdp } from '@solidlab/idp';

await getIdp('https://rubensworks.solidcommunity.net/profile/card#me');

If you have an authenticated Solid session object, you can determine its IDP as follows:

const getIdpWithSession = getIdp.with({ session });

await getIdpWithSession(session.info.webId);

If you want to use a custom query engine instead of the default one, make sure to use the light version of this package, which enables the default query engine to be tree-shaked out during bundling:

import { getIdp } from '@solidlab/idp/light';

const getIdpWithEngine = getIdp.with({ engine: new CustomQueryEngine() });
await getIdpWithEngine('https://rubensworks.solidcommunity.net/profile/card#me');

License

This code is copyrighted by Ghent University – imec and released under the MIT license.

Index

Variables

Variables

Const getIdp

getIdp: { with: any } = ...

Obtain the identity provider (a.k.a. OIDC issuer) of a given WebID.

This function will dereference the URL of the given WebID, and find the value referred to by the solid:oidcIssuer predicate.

param

The URL of a WebID.

param

A solid utility context.

Type declaration

Generated using TypeDoc