Skip to main content

AUTH_STATUS

Constant AUTH_STATUS 

Source
pub const AUTH_STATUS: &str = "\
Check every profile: who the token belongs to, and what it can see.

```
ytcli auth status
ytcli auth status --brief
ytcli auth status --active-only
```

The full form asks Tracker for queues, projects, goals and your open issues, and
the Wiki whether it accepts the token (`wiki: ok`, or what to do if not), so it
costs several requests per profile; `--brief` verifies identity only.

`access:` is what the token was signed in for: `read` after `auth login
--read-only`, `write` otherwise. Yandex cannot be asked a token's scopes, so a
pasted token, or any token while `YTCLI_TOKEN` is set, shows `unknown`.

Exit code 3 means the active profile has no usable credentials. A profile that
fails while the active one works is reported but does not change the exit code:
the answer to \"can I work right now\" is about the profile in play.

Also records which queue keys exist in which organisation, which is what lets a
bare `PROJ-1` be refused when two profiles would both answer to it.";