Discover Packages
github.com/usebraid/braid
internal
server
webauth
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Nov 13, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 22
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package webauth implements OIDC web login (authorization code + PKCE) and DB-backed sessions.
CookieName is the session cookie.
Auth serves the /auth/* routes and the session middleware.
Check validates the session cookie without side effects (no sliding expiry); see lookup for ok and err.
Register mounts /auth/login, /auth/callback and /auth/logout.
Require authenticates the request or answers 401 (API) / redirects to login.
RequireAdmin must be used behind Require.
type Principal struct {
UserID string
IsAdmin bool
}
Principal is the authenticated web user.
PrincipalFrom returns the principal set by Require.
Source Files
¶
Directories
¶
Package oidctest is a minimal in-process OIDC provider for tests.
Package oidctest is a minimal in-process OIDC provider for tests.
Click to show internal directories.
Click to hide internal directories.