Skip to content

agent 4.0.0 / resource 2.5.0 / fetch 4.0.0: presented_token, clock_skew, mockin 3.0.0 - #27

Merged
dickhardt merged 1 commit into
mainfrom
presented-token-agent
Sep 8, 2026
Merged

agent 4.0.0 / resource 2.5.0 / fetch 4.0.0: presented_token, clock_skew, mockin 3.0.0#27
dickhardt merged 1 commit into
mainfrom
presented-token-agent

Conversation

@dickhardt

Copy link
Copy Markdown
Contributor

AAuth -11 issue #152 (dickhardt/AAuth#153) on the agent side, plus clock_skew (§Expiry and the Refresh Margin).

  • agent 4.0.0 (breaking): exchangeToken requires presentedToken and sends presented_token; checks the resource token's presented_jti names it before the round trip; TokenExchangeError.retryAfterSeconds on clock_skew (wait, do not refresh). createAAuthFetch presents the person token, or on a step-up the cached auth token that drew the challenge; returns a clock_skew 401 unchanged and keeps its cached token.
  • resource 2.5.0: createResourceToken({ presentedToken }) accepts a verified person token, a verified auth token (step-up), or a reference; personToken stays as a deprecated alias.
  • fetch 4.0.0: authorize obtains a person token first (when a person server is configured) and presents it; two-party stays on the agent token.
  • mcp-stdio / mcp-openclaw 3.1.0: @aauth/agent ^4.0.0.
  • e2e runs against @hellocoop/mockin 3.0.0; the fake resource names the auth token on a per-call challenge and keeps no person-token record.

770 tests passing (59 e2e against mockin). Lockfile: platform nodes intact.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEeAq61zr1oVg5FAFf3JTH

…resented_token, clock_skew, mockin 3.0.0

AAuth -11 issue #152: the auth token request carries presented_token —
the token the agent presented to the resource, which the resource
token's presented_jti names.

agent 4.0.0 (breaking: exchangeToken requires presentedToken)
- exchangeToken sends presented_token, checks presented_jti names it
  before the round trip (§Resource Token Verification, agent side)
- TokenExchangeError.retryAfterSeconds on clock_skew, from the server's
  Date header: wait, do not refresh
- createAAuthFetch tracks what it presented: the person token, or on a
  step-up the cached auth token that drew requirement=auth-token; a 401
  clock_skew on a cached token is returned unchanged and the token kept;
  an auth-token challenge on a request that presented nothing is an error

resource 2.5.0
- createResourceToken takes presentedToken: a VerifiedPersonToken, a
  VerifiedAuthToken (step-up: ps from the auth token, presented_jti its
  jti) or a reference; personToken kept as a deprecated alias

fetch 4.0.0
- authorize gets a person token first when a person server is
  configured and presents it to the resource; two-party (no PS) unchanged

e2e: @hellocoop/mockin ^3.0.0 (verifies presented_token; strict exp;
clock_skew); the fake resource names the auth token on a per-call
challenge and keeps no person-token record.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEeAq61zr1oVg5FAFf3JTH
@dickhardt
dickhardt merged commit b19dd7d into main Sep 8, 2026
1 check passed
@dickhardt
dickhardt deleted the presented-token-agent branch September 8, 2026 14:09
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