Documentation
¶
Overview ¶
Package ui is the server's own browser surface, served by agentryd at /ui/: the device-authorize page the CLI and the desktop app open, and, without a site in front, the hand-off to the deployment's OpenID provider, sign-out and the page an activation link opens. Everything else a person does is the API's, through the CLI, the desktop app or a site.
It is deliberately plain: server-rendered html/template, no JavaScript, one stylesheet, brand from config. Every page acts through the API's own handlers in-process with the browser's cookies (client.go), so a page can do nothing the API would refuse and the authorization matrix stays the only one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Brand ¶
type Brand struct {
Name string
LogoURL string
CSSURL string
SupportEmail string
SecurityEmail string
PrivacyURL string
TermsURL string
}
Brand is what the pages call this deployment and where they send people.
type Options ¶
type Options struct {
// API is the server's full handler chain (middleware included); every
// page call goes through it in-process.
API http.Handler
// Mode is config ui.mode: full or authorize (off is never mounted).
Mode string
// SiteURL is config web.url: when set, sign-in is the site's, and only
// the authorize page is served here.
SiteURL string
// BaseURL is the server's public origin (for absolute links); may be "".
BaseURL string
Brand Brand
// Providers are the configured sign-in providers, in display order.
Providers []Provider
// IdPLogoutURL, when set, is where sign-out sends the browser after the
// session is revoked (the directory's end-session flow).
IdPLogoutURL string
CookieSecure bool
Log *slog.Logger
}
Options wires the surface to the server.