3.0.1 • Published 2 months ago

@comunica/actor-http-inrupt-solid-client-authn v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Comunica Inrupt Solid Client Authn Http Actor

npm version

An HTTP actor that does authenticated Solid requests using Inrupt's solid-client-authn-js libraries.

To make this actor apply, the context must contain an authenticated Session object at the '@comunica/actor-http-inrupt-solid-client-authn:session' entry, for example:

const { interactiveLogin } = require('solid-node-interactive-auth');
const session = await interactiveLogin({ oidcIssuer: 'https://solidcommunity.net/' });

await newEngine().query('SELECT * WHERE { ?s ?p ?o }', {
  sources: [ 'http://example.org/some-page' ],
  '@comunica/actor-http-inrupt-solid-client-authn:session': session,
});

This module is part of the Comunica framework, and should only be used by developers that want to build their own query engine.

Click here if you just want to query with Comunica.

Install

$ yarn add @comunica/actor-http-inrupt-solid-client-authn

Configure

After installing, this package can be added to your engine's configuration as follows:

{
  "@context": [
    ...
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-inrupt-solid-client-authn/^3.0.0/components/context.jsonld"
  ],
  "actors": [
    ...
    {
      "@id": "urn:comunica:default:http/actors#inrupt-solid-client-authn",
      "@type": "ActorHttpInruptSolidClientAuthn"
    }
  ]
}