Files
go-nc-exapp/CONTEXT.md
T
Konrad NeitzelandCursor 7921694782 Extract AppAPI auth and OCS preferences from CheckDNS.
Publish gonexapp v1 with Credentials, OCSClient, and parameterized
AppAPIPreferences so ExApps share Nextcloud ExApp plumbing per ADR 0013.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 19:14:22 +02:00

1.2 KiB

go-nc-exapp

Shared Go Library for Nextcloud ExApp Services: AppAPI authentication, OCS calls, and per-user ExApp preferences. ExApps import gitea.neitzel.de/konrad/go-nc-exapp. File storage and folder visits live in go-nc-files.

Language

AppAPI credentials: The ExApp's shared secret and Nextcloud base URL, plus optional per-request user identity. Used to sign outbound calls to Nextcloud and to read the requesting user from inbound AppAPI-proxied requests. Avoid: API key (generic), session token

Requesting user: The Nextcloud user on whose behalf the current ExApp request runs, taken from AppAPI authorization headers. WebDAV and preferences use this user; there is no separate ExApp login. Avoid: service account (for per-request identity), anonymous

ExApp preference: A string value stored in Nextcloud for one user and one ExApp, keyed by the ExApp (not admin AppConfig). Libraries expose a parameterized key; each ExApp chooses its own key names. Avoid: settings file in User Files, instance-wide config

OCS: Nextcloud's legacy HTTP API surface under /ocs/v2.php/…. This Library requests JSON responses (format=json) for machine-readable bodies. Avoid: assuming XML responses, REST-only Nextcloud APIs for ExApp prefs