Clarify token scan identity columns

This commit is contained in:
mpabi
2026-04-26 20:02:43 +02:00
parent 758e4871fb
commit 5f0da59aa2
4 changed files with 70 additions and 60 deletions
+14 -12
View File
@@ -305,20 +305,22 @@ Typowy wynik:
```text
items
item source remote kind user token_ref result status url
---- ----------- ---------- -------- ---------- ---------- ---------------- ----------- --------------------------------
1 repo r1 auth u1 remote existing in_sync http://77.90.8.171:3001
1 tokens.json store u1 t1 present in_sync http://77.90.8.171:3001
item source id credential user has_token sync endpoint
---- ----------- ---------- ---------- ---------- --------- ----- --------------------------------
1 repo r1 auth u1 yes yes http://77.90.8.171:3001
1 tokens.json t1 store u1 yes yes http://77.90.8.171:3001
```
Jesli remote istnieje, ale ma URL bez `LOGIN:TOKEN@`, wynik bedzie mial
w wierszu `repo` wartosci `kind=plain` i `result=no_credentials`. Jezeli
ten sam endpoint istnieje w `tokens.json`, drugi wiersz tego samego `item`
pokaze `source=tokens.json`, `token=t1` i `result=present`.
w wierszu `repo` wartosci `credential=plain` i `has_token=no`. Jezeli ten sam
endpoint istnieje w `tokens.json`, drugi wiersz tego samego `item` pokaze
`source=tokens.json`, `id=t1` i `has_token=yes`.
Ten sam numer `item` oznacza jedna pare logiczna dla jednego endpointu. Wiersz
`source=repo` pokazuje stan remote, a wiersz `source=tokens.json` pokazuje stan
lokalnego store.
lokalnego store. Kolumna `sync` jest flaga zgodnosci calej pary repo/store.
Kolumna `id` pokazuje identyfikator miejsca przechowywania tokena: dla repo jest
to nazwa remota, na przyklad `r1`, a dla store nazwa tokenu, na przyklad `t1`.
Przyklad:
@@ -382,10 +384,10 @@ repo_root<TAB>...
token_path<TAB>...
items
item source remote kind user token_ref result status url
---- ----------- ---------- -------- ---------- ---------- ---------------- ----------- --------------------------------
1 repo r1 plain no_credentials store_ahead http://77.90.8.171:3001
1 tokens.json store u1 t1 present store_ahead http://77.90.8.171:3001
item source id credential user has_token sync endpoint
---- ----------- ---------- ---------- ---------- --------- ----- --------------------------------
1 repo r1 plain no no http://77.90.8.171:3001
1 tokens.json t1 store u1 yes no http://77.90.8.171:3001
status
item<TAB>value
+9 -6
View File
@@ -104,13 +104,16 @@ Kolumny w tabeli `items`:
- `item` - numer porownywanego endpointu
- `source` - `repo` albo `tokens.json`
- `remote` - nazwa remote, na przyklad `r1`; tylko dla `source=repo`
- `kind` - `auth`, `plain`, `store` albo `missing`
- `id` - identyfikator miejsca tokena: remote `r1` dla repo albo token `t1` dla `tokens.json`
- `credential` - typ wpisu: `auth`, `plain`, `store` albo `missing`
- `user` - login odczytany z URL albo ze store
- `token_ref` - referencja bez sekretu: `remote` dla tokenu w URL albo nazwa tokenu ze store, na przyklad `t1`
- `result` - `added`, `existing`, `present`, `no_credentials` albo `missing`
- `status` - relacja repo do `tokens.json`, na przyklad `in_sync` albo `store_ahead`
- `url` - endpoint serwera bez sekretu, trzymany jako ostatnia kolumna i przycinany do szerokosci tabeli
- `has_token` - `yes` albo `no`, czyli czy dane zrodlo ma token dla endpointu
- `sync` - `yes` albo `no`, czyli czy para repo/store jest zgodna
- `endpoint` - endpoint serwera bez sekretu, trzymany jako ostatnia kolumna i przycinany do szerokosci tabeli
Tabela nie wypisuje sekretu tokena. Jezeli token jest w remote, `id` pokazuje
nazwe remota, na przyklad `r1`. Jezeli token jest w `tokens.json`, `id`
pokazuje nazwe tokenu, na przyklad `t1`.
Przyklad: