You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plugin api: api.auth.registerVerifier() — plugin-issued credentials accepted on pod resources #622
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 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.
Proposal
api.auth.registerVerifier({id: 'lws-at-jwt',// Cheap shape check so verifiers don't all parse every request.match(request){return/^Bearer/i.test(request.headers.authorization)&&looksLikeAtJwt(...);},// Returns an agent id (WebID / DID string) or null. Throw to reject with 401.asyncverify(request){ ... },});
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.
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.
Why a seam, not core
The 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).
Activity