Skip to content

Spec 031: ORCID "Claim your work" on the node content service - #996

Open
adamjohnwright wants to merge 1 commit into
mainfrom
spec/orcid-claim
Open

adamjohnwright wants to merge 1 commit into
mainfrom
spec/orcid-claim

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Summary

The spec, plan and tasks for porting ORCID "Claim your work" to the node content service, as decided on 16 Nov 2026: keep the feature, port it to node (never Java, no Java fallback), build and test against a stub ORCID, then ORCID's Sandbox Member API on the test site. Production credentials and switching production are out of scope. No implementation code.

Replaces spec 006's T110 (#114), which now points here. Adds the ORCID section (12 rows, spec only) and three open decisions to documentation/declared-differences.md.

  • specs/031-orcid-claim/spec.md: five stories, FR-001 to FR-031, three open questions
  • contracts/endpoints.md: each old endpoint against the new
  • contracts/orcid-works.md: what is sent to ORCID (Member API v3.0)
  • contracts/checks.md: C1 to C27, each with the breakage that must turn it red
  • research.md (R1 to R13), data-model.md, quickstart.md, tasks.md (T001 to T028)

Endpoints

# Method, path New behaviour Shape vs old module
1 GET /orcid/login 302 to ORCID with state (and PKCE if ORCID checks it), redirect URI from settings, optional ?return= (site paths only) Same; new inputs
2 GET /orcid/callback and /content/orcid/callback Checks state, exchanges the code on the server, new session, 302 to /orcid-callback?outcome=…; never passes on the code Changed (security)
3 GET /orcid/token Not served (folded into the callback) Retired (security)
4 /orcid/signout POST, same-origin only; deletes the session, revokes the token (if decided); body success Method changed
5 GET /orcid/authenticated {enabled, signedIn, orcid?, name?} Changed (was a boolean)
6–10 POST /orcid/claim/{all,pa,pr,ra,rr} Same body (person id, text) and ClaimingSummary; ≤100 works per ORCID call; statuses 401/403/404/409/502/504 Same
11 GET /orcid/{orcid}/works Only the works Reactome added, as OrcidWork[] Narrowed
12 GET /orcid/let-us-know-your-orcid {title, subject, message}, no token, no captcha key Changed (security)

Tokens live only in the service's memory behind an opaque HttpOnly cookie (30 minutes idle, 8 hours at most). There is no token, code, secret, iD or name in any answer, log or file. The feature is on only when its settings are complete, and ORCID's production servers are refused without an explicit switch. No test ever reaches ORCID.

Open questions for the maintainer

  1. FR-016: revoke the token at sign-out and expiry? Recommended: yes, best effort. Reactome never uses a token after its session, and ORCID tokens last about 20 years.
  2. FR-022: which Person a sandbox account claims for on the test site? Sandbox iDs never match a real Person. Recommended: a test-only mapping (ORCID_TEST_PERSON=<sandbox iD>:<dbId>) in the host's private settings, honoured only with the stub or sandbox, naming a Person whose owner agrees.
  3. FR-023: where claim records go? Recommended: the host's report webapp, through its existing claim-register call, fire-and-forget as report.ts already reports searches. Claims only, never a token, and no sign-in record.

Redirect URIs to register on the sandbox client (placeholders): https://<test-site>/content/orcid/callback, https://<test-site>/ContentService/orcid/callback, and the same two under http://localhost:<port>.

🤖 Generated with Claude Code

The spec, plan and tasks for porting the old website's ORCID module to the
node content service, as decided on 16 Nov 2026: node only, never Java;
built against a stub ORCID, then ORCID's sandbox on the test site;
production later.

- spec.md: five stories, FR-001 to FR-031, three open questions for the
  maintainer (revocation at sign-out, the sandbox Person, where claim
  records go), each with a recommendation.
- contracts/endpoints.md: the eleven old endpoints against the new, one
  by one; the claims keep their paths, body and answer.
- contracts/orcid-works.md, checks.md (C1-C27, each with its breakage),
  research.md (R1-R13), data-model.md, quickstart.md, tasks.md (T001-T028).
- The register of declared differences gains the ORCID section (12 rows,
  spec only) and the three open decisions; spec 006's T110 points here.

No implementation code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant