Title: plugin api: api.auth.registerVerifier() — plugin-issued credentials accepted on pod resources · Issue #622 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: plugin api: api.auth.registerVerifier() — plugin-issued credentials accepted on pod resources · Issue #622 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: plugin api: api.auth.registerVerifier() — plugin-issued credentials accepted on pod resources · Issue #622 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Plugin seam for #621 (LWS), under #206. Problem The auth chain in src/auth/token.js is hardcoded: Solid-OIDC → LWS-CID → NIP-98 → Bearer-from-IdP. A plugin that issues its own credentials — the LWS authorization server's at+jwt access to...
Open Graph Description: Plugin seam for #621 (LWS), under #206. Problem The auth chain in src/auth/token.js is hardcoded: Solid-OIDC → LWS-CID → NIP-98 → Bearer-from-IdP. A plugin that issues its own credentials — the LWS...
X Description: Plugin seam for #621 (LWS), under #206. Problem The auth chain in src/auth/token.js is hardcoded: Solid-OIDC → LWS-CID → NIP-98 → Bearer-from-IdP. A plugin that issues its own credentials — the LWS...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/622
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"plugin api: api.auth.registerVerifier() — plugin-issued credentials accepted on pod resources","articleBody":"Plugin seam for #621 (LWS), under #206.\n\n## Problem\n\nThe auth chain in `src/auth/token.js` is hardcoded: Solid-OIDC → LWS-CID → NIP-98 → Bearer-from-IdP. A plugin that issues its own credentials — the LWS authorization server's `at+jwt` access tokens, but equally a did:key verifier (#86) or any future scheme — has no way to make pod resources accept them. It can only authenticate requests under its own mount prefix.\n\n## Proposal\n\n```js\napi.auth.registerVerifier({\n id: 'lws-at-jwt',\n // Cheap shape check so verifiers don't all parse every request.\n match(request) { return /^Bearer /i.test(request.headers.authorization) && looksLikeAtJwt(...); },\n // Returns an agent id (WebID / DID string) or null. Throw to reject with 401.\n async verify(request) { ... },\n});\n```\n\n- Registered verifiers run **after** the built-in chain, in registration order, before the Bearer-from-IdP fallback — so a plugin can't shadow OIDC or NIP-98.\n- Result feeds the same `getWebIdFromRequestAsync` path `api.auth.getAgent` already blesses (#584), so WAC sees the agent exactly as it would any other.\n- Verifier errors are logged with the plugin id and treated as \"not this verifier\", not as a hard 401, unless the verifier throws an explicit `AuthError`.\n\n## Why a seam, not core\n\nThe LWS AS belongs in the plugin (it's its own service with its own `/.well-known`), but its tokens must work on `/alice/foo`. Same shape as what Jesse needed in CSS (`LwsAccessTokenExtractor` plugged into the existing credentials extractor chain).\n\nPrior art: Jesse's [`jeswr/LinkedWebStorage`](https://github.com/jeswr/LinkedWebStorage) `LwsAccessTokenExtractor`.\n","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-10-14T17:05:54Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/622"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e5ff389a-8661-c522-549c-1dd70e6f1a81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B706:1E05DF:3C0E12:4F23F6:6B037D44 |
| html-safe-nonce | 0054e2652a1250a6612d37371764a0b666e8e09aaf851402b9270e7053ecb992 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzA2OjFFMDVERjozQzBFMTI6NEYyM0Y2OjZCMDM3RDQ0IiwidmlzaXRvcl9pZCI6IjgzMzQwMTQ1MTY4NTU3NjAwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0a055deb099b8a5003f6851b68343724f60cd7daaea5592f8659f72d43ab2323 |
| hovercard-subject-tag | issue:5852094327 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/622/issue_layout |
| twitter:image | https://opengraph.githubassets.com/94502f13d9eeb0135974ecf6c5e1230b28d2904b577d548c083d3230fd4cf6ce/JavaScriptSolidServer/JavaScriptSolidServer/issues/622 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/94502f13d9eeb0135974ecf6c5e1230b28d2904b577d548c083d3230fd4cf6ce/JavaScriptSolidServer/JavaScriptSolidServer/issues/622 |
| og:image:alt | Plugin seam for #621 (LWS), under #206. Problem The auth chain in src/auth/token.js is hardcoded: Solid-OIDC → LWS-CID → NIP-98 → Bearer-from-IdP. A plugin that issues its own credentials — the LWS... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width