Skip to content

Wire up ORCID login + Claim Your Work buttons in PersonDetailComponent #114

@adamjohnwright

Description

@adamjohnwright

Background

PersonDetailComponent at /content/detail/person/:id is shipped (#99 closed) and renders the four authored/reviewed pathways/reactions sections correctly — those REST endpoints already return 200 on dev/beta (content-service add-content-page-endpoints branch, staged in tomcat here).

The missing piece is the ORCID-authenticated "Claim Your Work" flow that the old Joomla person page surfaced. This is contributor-facing functionality that must come across before we can fully retire the Joomla page.

Backend status (already done, in ~/git/content-service branch add-content-page-endpoints)

  • New org.reactome.server.orcid.* package (32 files: controllers, dao, domain, exception, util) — verbatim port from ~/git/data-content.
  • OrcidInterceptorConfig registers /orcid/** path interceptor.
  • HostnameUtil.matchesHostname(...) replaces the old WebUtils dependency.
  • Two view-rendering endpoints converted to JSON (content-service has no JSP support):
    • OrcidController.autoFillContactFormShareYourOrcidPayload
    • OrcidAuthorizationFlow.callbackCallbackResult
  • OAuth callback path moved from /content/orcid/callback/ContentService/orcid/callback.
  • service.properties now reads orcid.{client.id,client.secret,auth.baseurl,api.baseurl,server} and captcha.site.key from the Reactome-Server maven profile.

Frontend work (this issue)

Add a "Claim Your Work" button group to PersonDetailComponent:

  1. On mount, call GET /ContentService/orcid/authenticated to check sign-in state.
  2. If not signed in, render a "Sign in with ORCID" button that redirects to /ContentService/orcid/login (server-side redirect to orcid.org).
  3. Once authenticated, render four claim buttons (or one "Claim All"):
    • POST /ContentService/orcid/claim/pa — pathways authored
    • POST /ContentService/orcid/claim/pr — pathways reviewed
    • POST /ContentService/orcid/claim/ra — reactions authored
    • POST /ContentService/orcid/claim/rr — reactions reviewed
    • POST /ContentService/orcid/claim/all — all four
    • Body: { personId: <stId or dbId> }
  4. Surface the returned ClaimingSummary (total / executed / errors) to the user.

Pre-deploy prerequisites

  • Build + redeploy content-service WAR (mvn clean package -P Reactome-Server -DskipTests) on the host serving this site.
  • Register the new redirect_uri /ContentService/orcid/callback in the ORCID dev console — without this, the login round-trip will fail.
  • Note OrcidServerInterceptor 404s /orcid/** unless the local hostname matches ${orcid.server} (currently reactome.org). To exercise on dev/beta, override that property or strip the hostname check temporarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions