Skip to content

Document server.registerBearerValidator - #737

Draft
kriszyp wants to merge 4 commits into
mainfrom
docs/register-bearer-validator
Draft

kriszyp wants to merge 4 commits into
mainfrom
docs/register-bearer-validator

Conversation

@kriszyp

@kriszyp kriszyp commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

⊙ Problem

Let components authenticate their own Bearer tokens as Harper users adds server.registerBearerValidator, a new public API for components, with no reference page.

🤔 Document it before the core PR merges?

Yes: the docs PR stays in draft until the core PR merges, and the OAuth plugin team needs the contract now. The page is badged v5.4.0, the next minor.

💡 Solution

✅ Verification

  • npm run format:check passes.
  • Each claim was checked against the core PR's server/Server.ts JSDoc, security/bearerValidators.ts and server/DESIGN.md, and by the pre-push review.

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp.

https://claude.ai/code/session_01FKif56wJ3LB5ZqsGi3E9eg

Related PRs: none found
Complexity: easy

Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex; adjudicated=domain; declined=cursor-grok,cursor-kimi,cursor-muse,muse; rounds=2; full=1 @ bc55a88

Review-Attention: skim ~2m (decisions: ship-docs-before-core-merge, shared-chain-budget) @ bc55a88

kriszyp and others added 3 commits October 19, 2026 21:59
Reference for the component Bearer-validator hook added in HarperFast/harper#3313: the result
contract, expiry and caching, rejection and timeout behavior, and an example. The overview's
authentication paragraph links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKif56wJ3LB5ZqsGi3E9eg
… release note

- The authExpiresAt entry states the one-year ceiling, the 5-minute default, and that a JWT whose
  exp has passed is refused (HarperFast/harper#3313 now does this) while the validator must still
  verify expiry itself.
- timeoutMs distinguishes the per-call limit from the per-request deadline the validators and the
  user lookup share.
- The JWT guide notes that a Bearer-validator caller cannot mint tokens without a password; the
  security overview links the hook; 5.4 release notes gain an Authentication entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKif56wJ3LB5ZqsGi3E9eg
Scoped minting stays refused for a Bearer-validator caller even with a password; the release note
limits the hook to the application port; the abort applies only to a validator still running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKif56wJ3LB5ZqsGi3E9eg

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces documentation and release notes for the new server.registerBearerValidator() API, which enables components to validate custom Bearer tokens. The feedback suggests a grammatical improvement and structural separation of a security warning in the API documentation to ensure clarity and better visibility of fallback behaviors.

Comment thread reference/http/api.md Outdated
@github-actions
github-actions Bot temporarily deployed to pr-737 October 20, 2026 04:47 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-737

This preview will update automatically when you push new commits.

@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-737

This preview will update automatically when you push new commits.

This branch was successfully deployed

1 active deployment
pr-737 — bc55a883 Deployed Oct 20, 2026 by github-actions[bot]
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