docs(design): specify v1/whoami in the index API protocol#462
Merged
Conversation
Add a Token Identity section to index-api-protocol.md covering the GET v1/whoami endpoint: bearer auth, the 200 body shape (subject type/name semantics per token type, token name/prefix/expires_at), the unspecified 401 body, optional rate limiting, and the requirement that the endpoint never consumes single-use credentials. The endpoint is already live on the index server, so this spec lands independently of the larger client credential-storage work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EfyrkJkeo3mRngVoppJjUN Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
consideRatio
force-pushed
the
docs/index-api-whoami
branch
from
July 20, 2026 09:06
12b1e6d to
85b7798
Compare
Co-authored-by: Andrius Pukšta <andrius.puksta@sensmetry.com> Signed-off-by: Erik Sundell <erik.i.sundell@gmail.com>
andrius-puksta-sensmetry
approved these changes
Jul 21, 2026
Collaborator
There was a problem hiding this comment.
Good enough for now.
using a token for test.sysand.com on sysand.com would otherwise not error on a "sysand auth login" command, because there would be no way to validate it before serious use
Token can e.g. be checked with e.g. HEAD request for index.json.
Edit: nevermind, public indexes don't require a token for reading...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written by erik:
This is a useful endpoint for the client to validate credentials against, where for example using a token for test.sysand.com on sysand.com would otherwise not error on a "sysand auth login" command, because there would be no way to validate it before serious use - and that delay is a bad UX -- better fail early!
Extracted from #453
Ai text below
What
Adds a Token Identity section to
design/index-api-protocol.mdspecifying the
GET v1/whoamiendpoint:200body shape:subject(type/name semantics per token type)and
token(name, prefix,expires_at)401bodyWhy now
The endpoint is already live on the index server (sysand.com and
staging), so the protocol spec should be documented in
mainrather thanwaiting behind the larger client-side credential-storage work. This PR
extracts just the
index-api-protocol.mdaddition from that branch so itcan land on its own.
Spec-only change: no code, no behavior change.
🤖 Generated with Claude Code