Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MountFedAdmin ¶
Types ¶
type Deps ¶
type Deps struct {
AuthCfg webx.AuthConfig
Sessions webx.SessionStore
PATs webx.PATLookup
SessionsSvc *app.SessionService
Tokens *app.TokenService
Account *app.AccountService
OAuth *app.OAuthService
Fed *app.FedService
FedAdminGuard func(http.Handler) http.Handler
// MFA, when non-nil, mounts the TOTP flows (ADR 0013 batch 2):
// /auth/mfa/* + POST /auth/verify-mfa. Nil = the capability is absent,
// not degraded — MFA cannot half-exist.
MFA *app.MFAService
// MFAChangeGuard wraps the MFA settings-mutating routes (disable /
// regenerate-backup-codes) in the product's step-up policy — e.g.
// webx.RequireRecentAuth(15 * time.Minute), mirroring GitHub's
// sudo-guarded 2FA settings. The window is product policy (no package
// default). Nil = no guard (dev convenience; production should set it).
MFAChangeGuard func(http.Handler) http.Handler
// PATCreateGuard, when non-nil, wraps POST /api/tokens — the product's
// gate for PAT creation (GitHub guards token generation behind sudo /
// AAL2 step-up; the strong-profile road mounts its catalog middleware
// here, the simple road webx.RequireRecentAuth / RequireRecentMFA).
// Nil = creation needs only a human session.
PATCreateGuard func(http.Handler) http.Handler
// BotGuard, when non-nil, wraps the bot-facing auth routes (register /
// send-code / forgot-password / send-verification) in the product's
// human verification — e.g. webx.Turnstile (Cloudflare). On
// send-verification it sits OUTSIDE RequireHuman: a bot must be judged
// before it can elicit a session-verdict. login / verify-code /
// reset-password stay unguarded (per-IP rate limiting is their defense;
// adding the guard there is product policy, one line away). Nil = the
// capability is absent, behavior unchanged.
BotGuard func(http.Handler) http.Handler
OAuthAppURL string
TrustedProxies []*net.IPNet
}
Click to show internal directories.
Click to hide internal directories.