diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2026-02-12 11:58:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-12 11:58:54 -0800 |
| commit | 94b2fd238ef3ce2b1b65a8a12c3ad72ef88dab40 (patch) | |
| tree | ce7b8eed476cf1ab414c2f1f8235b53b8f7ecd02 /crates/atuin-common/src/api.rs | |
| parent | feat(docs): Add Shell Integration and Interoperability docs (#3163) (diff) | |
| download | atuin-94b2fd238ef3ce2b1b65a8a12c3ad72ef88dab40.zip | |
feat: add Hub authentication for future sync + extra features (#3010)
Diffstat (limited to 'crates/atuin-common/src/api.rs')
| -rw-r--r-- | crates/atuin-common/src/api.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/atuin-common/src/api.rs b/crates/atuin-common/src/api.rs index 5887424f..efc17163 100644 --- a/crates/atuin-common/src/api.rs +++ b/crates/atuin-common/src/api.rs @@ -117,3 +117,20 @@ pub struct MessageResponse { pub struct MeResponse { pub username: String, } + +// Hub CLI authentication types + +/// Response from POST /auth/cli/code - generates a code for CLI auth +#[derive(Debug, Serialize, Deserialize)] +pub struct CliCodeResponse { + pub code: String, +} + +/// Response from GET /auth/cli/verify?code=<code> - polls for authorization +#[derive(Debug, Serialize, Deserialize)] +pub struct CliVerifyResponse { + /// Session token, present only when authorization is complete + pub token: Option<String>, + pub success: Option<bool>, + pub error: Option<String>, +} |
