woodglue.apps.uis¶
Serving the Console and UIs behind the view Grant.
Serving the Console and project UIs behind the view Grant.
Every UI has a name, and opening it needs view on ui:<name>; the Console is
the UI named console, served at /console/, and project UIs are served at
/ui/<name>/ (see woodglue.config.UiEntry). A page load without a Session
redirects to /auth/login?next=<path>, and one without the Grant gets 403. A
UI marked public skips both checks; the API it calls still needs a Caller.
UiStaticHandler
¶
Bases: StaticFileHandler
Static files of one UI, gated by require_view unless public.
Source code in src/woodglue/apps/uis.py
VerifyHandler
¶
Bases: RequestHandler
GET /auth/verify: access check for a reverse proxy's forward_auth
(see docs/adr/0004). The UI is ?ui=<name>, or taken from the
X-Forwarded-Uri the proxy sends (/ui/<name>/... or /console/...).
Answers 200 with the identity headers for an allowed request, a redirect to
the login page (returning to the original URI) without a Session, 403
without the view Grant, and 400 if no UI can be named.
Source code in src/woodglue/apps/uis.py
ui_path(name)
¶
The URL path where a UI is served.
identity_headers(auth, store, ui_name, grants=None)
¶
The headers that tell a UI's server who is viewing (see
woodglue.ui_support): the User as JSON, and for a browser Session a
Delegated Token for this UI, narrowed to the UI's grants.
Source code in src/woodglue/apps/uis.py
require_view(handler, ui_name)
¶
Check that the request may open ui_name, finishing it with a login
redirect or 403 if not. Returns the request's Authentication, or None
once the request is finished.