Skip to content

Add oidcIssuers getter to Agent#28

Merged
langsamu merged 4 commits intosolid:mainfrom
jeswr:feat/agent-oidcissuers
Apr 23, 2026
Merged

Add oidcIssuers getter to Agent#28
langsamu merged 4 commits intosolid:mainfrom
jeswr:feat/agent-oidcissuers

Conversation

@jeswr
Copy link
Copy Markdown
Member

@jeswr jeswr commented Apr 23, 2026

Summary

Add an oidcIssuers getter on Agent that returns the values of solid:oidcIssuer triples on the WebID profile, mirroring the existing pimStorage / solidStorage / storageUrls getters.

solid:oidcIssuer is the predicate Solid-OIDC mandates for WebID-Issuer Discovery (see Solid-OIDC spec, WebID-Issuer Discovery section). Downstream consumers — @jeswr/solid-reactive-fetch's WebIDProfileAgent and the ODI Solid browser extension's inject.ts — currently subclass Agent purely to add this same getter. Hosting it on the base Agent lets both packages drop the subclass.

The implementation is a one-line addition that delegates to SetFrom.subjectPredicate exactly as solidStorage does, so it picks up the same Set<string> semantics consumers already rely on for storage discovery.

Test plan

  • New unit test test/unit/agent.test.ts verifies the getter returns both values when a WebID declares multiple solid:oidcIssuer triples.
  • npm test passes (22/22 tests).

Mirrors the existing pimStorage / solidStorage / storageUrls
getters. Solid-OIDC mandates solid:oidcIssuer for issuer
discovery; downstream consumers (reactive-fetch, the ODI Solid
browser extension) currently subclass Agent to add this same
getter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 23, 2026 01:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support for Solid-OIDC WebID Issuer Discovery on the core Agent model by introducing an oidcIssuers getter that reads solid:oidcIssuer values from the WebID profile, consistent with existing storage discovery getters.

Changes:

  • Add Agent.oidcIssuers getter backed by SetFrom.subjectPredicate on solid:oidcIssuer.
  • Add unit test coverage ensuring multiple solid:oidcIssuer triples are returned as a set.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/webid/Agent.ts Adds oidcIssuers getter using the same set-based extraction pattern as solidStorage.
test/unit/agent.test.ts Verifies the getter returns all issuer URLs when multiple issuers are declared.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@langsamu langsamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor naming consistency request.

Comment thread src/webid/Agent.ts Outdated
Comment thread test/unit/agent.test.ts Outdated
Comment thread test/unit/agent.test.ts Outdated
jeswr and others added 3 commits April 23, 2026 10:01
Co-authored-by: Samu Lang <langsamu@users.noreply.github.com>
Co-authored-by: Samu Lang <langsamu@users.noreply.github.com>
Co-authored-by: Samu Lang <langsamu@users.noreply.github.com>
@jeswr jeswr enabled auto-merge (squash) April 23, 2026 11:05
@jeswr jeswr requested a review from langsamu April 23, 2026 11:05
@jeswr jeswr disabled auto-merge April 23, 2026 14:42
@langsamu langsamu merged commit 88c2c3a into solid:main Apr 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants