Merged
Conversation
0a66beb to
e715b18
Compare
jmsanders
previously approved these changes
Feb 23, 2026
0f39105 to
bef1bdd
Compare
Introduces a new docstoken package for persisting docs API tokens alongside the auth token they were derived from. Adds a POST /api/auth/docs_token endpoint to the API client.
bef1bdd to
600f5a3
Compare
Replaces the two identity headers (X-RWX-Organization, X-RWX-User-ID) with a single X-RWX-Docs-Token header on docs API requests. The token is obtained from a dedicated cloud endpoint, cached alongside the auth token it was derived from, and refreshed when the auth token changes. Removes fetchAndCacheIdentity from login and cacheWhoamiResult from whoami since identity caching is no longer needed.
600f5a3 to
25f73fd
Compare
jmsanders
approved these changes
Feb 24, 2026
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.
Slack thread
This PR allows the CLI to exchange a Cloud access token for a Docs access token (see https://github.com/rwx-cloud/cloud/pull/6902) and passes that along to calls to the docs site.
Summary
POST /api/auth/docs_tokenendpoint to the API client for obtaining docs-specific tokensdocstokenpackage that persists the token alongside the auth token it was derived from, refreshing automatically when the auth token changesX-RWX-Docs-Tokenheader on docs API requestsX-RWX-OrganizationandX-RWX-User-IDidentity headersTest plan
go build ./cmd/rwxcompilesgo test ./internal/... ./cmd/...passesrwx docs search "caching"→ inspect request headers to verifyX-RWX-Docs-Tokenis present