mirror of
https://github.com/ARUP-CAS/aiscr-qgis-amcr-viewer.git
synced 2026-10-09 12:27:36 +02:00
* fix: před stahováním ověřit přihlášení přes islogged Server při vypršelé session nevrací chybu, ale tiše odpoví jako anonymnímu uživateli (jen přístupnost A). Plugin proto před stahováním volá /api/user/islogged; při 'nologged' se jednou znovu přihlásí z uložených údajů, a když to nejde, varuje v liště, že stahuje anonymně. - amcr_tools: _check_islogged, _ensure_logged_in, volání v load_amcr_data - smoke test: 7 offline scénářů stavu přihlášení - README; changelog v2.2.0 v metadata.txt - openspec/changes/fix-session-expiry-islogged: návrh, spec, design, úkoly Closes #72. Připraveno s pomocí AI (Claude), ručně zkontrolováno. * feat: odebrání přihlašovacích údajů uživatele i odhlásí Dosud zůstala přihlášená session v paměti až do restartu QGIS, takže se po „Odebrat uložené přihlašovací údaje“ dál stahovalo jako přihlášený. Nově se session odhlásí na serveru (GET /api/user/logout) a zahodí; když server neodpoví, zahodí se aspoň lokálně. - amcr_tools: logout_from_api; amcr_dialog: volání v _forget_credentials - smoke test: odhlášení, chyba sítě, bez session - README, changelog v2.2.0, OpenSpec (požadavek + úkoly 2b; 3.3 ověřeno) Připraveno s pomocí AI (Claude), ručně zkontrolováno. * chore: archivovat OpenSpec změnu fix-session-expiry-islogged Všechny úkoly hotové (2b.2 – odhlášení – ověřeno ručně v QGIS), archivováno s --skip-specs (stupeň change-tracked, bez openspec/specs/). Připraveno s pomocí AI (Claude), ručně zkontrolováno.
This commit is contained in:
1 parent
e5b0716fd6
commit
74090a80c6
10 files changed
+614
-10
No files matched your search
@@ -106,12 +106,16 @@ to see.
|
||||
* They are then saved encrypted in the **QGIS Authentication Manager** (DPAPI
|
||||
on Windows, Keychain on macOS, encrypted SQLite on Linux). QGIS will ask for
|
||||
its master password.
|
||||
* Stored credentials are reused across QGIS sessions. If the session cookie
|
||||
expires mid-download, the plugin re-authenticates automatically and repeats
|
||||
the request.
|
||||
* Stored credentials are reused across QGIS sessions. The plugin checks
|
||||
the login state before every download (via the `islogged` endpoint)
|
||||
and, when the session cookie has expired, re-authenticates
|
||||
automatically. If re-authentication is not possible, a warning in the
|
||||
message bar says the download runs anonymously (access level A only);
|
||||
a failed check never blocks the download.
|
||||
* Reopening the login dialog lets you change the e-mail (leave the password
|
||||
blank to keep the stored one) or remove the credentials entirely
|
||||
(*Odebrat uložené přihlašovací údaje*).
|
||||
(*Odebrat uložené přihlašovací údaje*). Removing them also logs you out
|
||||
of the Digital Archive, so the next download runs anonymously.
|
||||
|
||||
### 3.3 The filter dialog
|
||||
|
||||
@@ -347,6 +351,8 @@ AGENTS.md contributor and AI-agent guidelines
|
||||
| Purpose | Endpoint | Notes |
|
||||
| --- | --- | --- |
|
||||
| Login | `POST https://digiarchiv.aiscr.cz/api/user/login` | Returns a session cookie. Errors arrive with HTTP 200 and an `error` key. |
|
||||
| Logout | `GET https://digiarchiv.aiscr.cz/api/user/logout` | Called when the stored credentials are removed. |
|
||||
| Login state | `GET https://digiarchiv.aiscr.cz/api/user/islogged` | `{"remaining": <s>}` when logged in, `{"error":"nologged"}` otherwise; checked before each download. |
|
||||
| Search | `GET https://digiarchiv.aiscr.cz/api/search/query` | `entity=akce\|lokalita\|samostatny_nalez\|pian`, `mapa=true`, paginated. |
|
||||
| Translations | `GET https://digiarchiv.aiscr.cz/api/assets/i18n/cs.json` | Code → Czech label; cached in memory for the session. |
|
||||
| Codelists | `GET https://api.aiscr.cz/2.2/oai` | OAI-PMH `ListRecords`, with resumption tokens. |
|
||||
|
||||
Reference in new issue
Block a user