New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graffiti-garden/solid-oidc-session-manager

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graffiti-garden/solid-oidc-session-manager

An implementation of the Graffiti API's login functionality using Solid OIDC

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

Graffiti Solid OIDC Session Manager

This implements the login and logout methods of the Graffiti API using Solid OIDC.

In the browser, when an application calls graffiti.login(), a dialog opens up that allows the user to log in either locally (for demoing/testing) or with a Solid OIDC provider. The actor IDs produced from Solid login are webId URLs that start with http, while actor IDs produced from local login will not start with http.

The node.js interface is not currently implemented and just returns an instance of GraffitiLocalSessionManager, but at some point it will be extended to use @inrupt/solid-client-authn-node.

Usage

Install the package with:

npm install @graffiti-garden/solid-oidc-session-manager

Then use it in your application as follows:

import { GraffitiSolidOIDCSessionManager } from "@graffiti-garden/solid-oidc-session-manager";

const sessionManager = new GraffitiSolidOIDCSessionManager();

sessionManager.sessionEvents.addEventListener("login", (event) => {
  console.log("Logged in as", event.detail.actor);
});

// Log in, in response to a user action
button.onclick = () => sessionManager.login()

See the demo for a full example.

Development

Clone the repository, then install and build the package as follows:

npm install
npm run build

Then you can run the demo by running:

npx http-server

and navigating to localhost:8080/demo.

Image Compression

To make the .jpg image smaller, use:

cwebp -q QUALITY -m 6 -mt graffiti.jpg -o graffiti.webp

Where quality is a number between 0 (horrible) and 100 (perfect).

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc