Documentation
¶
Overview ¶
Package auth is the only way apps learn who is calling (docs/adr/0004-tailscale-identity-via-caddy.md). Identity arrives as Tailscale-User-* headers set by the edge proxy; the Tailscale ACL guarantees nothing else can reach an app port (ADR-0011).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct {
Login string // e.g. "bketelsen@github" — stable identifier
Name string // display name; falls back to Login
}
func FromContext ¶
FromContext returns the authenticated user. It panics if the handler was not wrapped by Middleware — that is a wiring bug, not a runtime condition.
Click to show internal directories.
Click to hide internal directories.