claude_auth
Anthropic OAuth token refresh transport — Layer * standalone primitive.
Responsibility
Owns the OAuth token-refresh wire protocol: TOKEN_URL, CLIENT_ID, request body, response
parsing. No quota, no profile management, no output formatting — those belong to consumers
(claude_profile, dream).
Feature Flags
| Feature | Adds | Extra dep |
|---|---|---|
| (none) | TokenRefreshResult, AuthError, parse_response, TOKEN_URL, CLIENT_ID |
— |
enabled |
refresh_token(refresh_tok, scope) |
ureq ~2 |
Public API
// Always available
pub const TOKEN_URL : &str;
pub const CLIENT_ID : &str;
Files
| File | Responsibility |
|---|---|
src/lib.rs |
Types, errors, constants, parse_response, refresh_token (feature-gated) |
tests/readme.md |
Test directory organization guide |
tests/auth_test.rs |
Unit tests T01–T06 for parse_response and AuthError (offline, no ureq) |
verb/ |
Shell scripts for each do protocol verb. |