|
12 | 12 | //! | Access token valid for > 30 s | return it directly | |
13 | 13 | //! | Access expiring or expired, refresh token valid | call `/o/token/` with `grant_type=refresh_token` | |
14 | 14 | //! | Refresh token dead, `api_key` present | re-mint via `grant_type=api_token` | |
15 | | -//! | Refresh token dead, no `api_key` | return an error — user must `hotdata auth` again | |
| 15 | +//! | Refresh token dead, no `api_key` | return an error — user must `hotdata auth login` again | |
16 | 16 | //! |
17 | 17 | //! The raw `hd_...` API token (flow 3 in the design doc) is *never* |
18 | 18 | //! persisted to the session file — it stays in the main config or the |
@@ -302,7 +302,7 @@ pub fn ensure_access_token( |
302 | 302 | // 0) An explicit identity override (`--api-key`, `HOTDATA_API_KEY`, |
303 | 303 | // or `.env`) is asserting a specific identity for *this invocation*. |
304 | 304 | // The on-disk session may belong to a completely different user |
305 | | - // from a prior `hotdata auth` and must not be reused. Mint fresh |
| 305 | + // from a prior `hotdata auth login` and must not be reused. Mint fresh |
306 | 306 | // and deliberately skip persisting so we don't clobber the |
307 | 307 | // interactive session. Surface the real mint error here too — if |
308 | 308 | // the override key is bad, "HTTP 401" is more useful than the |
@@ -358,7 +358,7 @@ pub fn ensure_access_token( |
358 | 358 | // API token rejected (revoked, expired, or invalid). |
359 | 359 | // Fall through to the re-auth hint — hide the raw HTTP |
360 | 360 | // error from the user; the api.rs caller appends a |
361 | | - // `hotdata auth` hint. |
| 361 | + // `hotdata auth login` hint. |
362 | 362 | } |
363 | 363 | } |
364 | 364 | } |
@@ -435,7 +435,7 @@ impl hotdata::auth::BearerTokenProvider for CliTokenProvider { |
435 | 435 | resolved.map_err(|body| { |
436 | 436 | // Surface as a 401 so `Configuration::resolve_bearer_token` logs the |
437 | 437 | // cause and the request proceeds to a 401 the wrapper shapes into |
438 | | - // the "run hotdata auth" hint (the same end-state as the old |
| 438 | + // the "run hotdata auth login" hint (the same end-state as the old |
439 | 439 | // ApiClient refresher returning None). |
440 | 440 | hotdata::auth::TokenExchangeError::Status { status: 401, body } |
441 | 441 | }) |
@@ -1235,7 +1235,7 @@ mod tests { |
1235 | 1235 | let (_tmp, _guard) = with_temp_config_dir(); |
1236 | 1236 | // No session, no api_key fallback -> ensure_access_token errors, the |
1237 | 1237 | // provider maps it to a 401 so the request proceeds to the wrapper's |
1238 | | - // "run hotdata auth" hint. |
| 1238 | + // "run hotdata auth login" hint. |
1239 | 1239 | let profile = mock_profile("http://127.0.0.1:1"); |
1240 | 1240 | let provider = session_provider(&profile, None); |
1241 | 1241 | match bearer(&provider).unwrap_err() { |
|
0 commit comments