Merge branch 'totp'
Both branches added database migration 3: DNSSEC (merged first) keeps 3 and TOTP becomes migration 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
a95dffb471
35 files changed
+1963
-43
No files matched your search
@@ -52,6 +52,10 @@ type Config struct {
|
||||
// without an API key); PorkbunAllows says which domains it may touch.
|
||||
Porkbun *porkbun.Client
|
||||
PorkbunAllows func(domain string) bool
|
||||
// TOTPRequire is totp.require (none, admins or all) and TOTPIssuer the
|
||||
// name authenticator apps show (h_totp.go).
|
||||
TOTPRequire string
|
||||
TOTPIssuer string
|
||||
}
|
||||
|
||||
// Server is the HTTP server.
|
||||
@@ -69,6 +73,8 @@ type Server struct {
|
||||
oldSecretWarn throttle
|
||||
// expiryWarn limits warnings about expiring tokens to one a day each.
|
||||
expiryWarn throttle
|
||||
// pendingLogins are logins waiting for their TOTP code.
|
||||
pendingLogins pendingLogins
|
||||
// nsChecker, when set, replaces the default name server checker
|
||||
// (tests point it at local DNS servers).
|
||||
nsChecker *nscheck.Checker
|
||||
@@ -91,6 +97,12 @@ func New(cfg Config, eng *engine.Engine, log *slog.Logger, web fs.FS) *Server {
|
||||
if cfg.CookieSecure == "" {
|
||||
cfg.CookieSecure = "auto"
|
||||
}
|
||||
if cfg.TOTPRequire == "" {
|
||||
cfg.TOTPRequire = "none"
|
||||
}
|
||||
if cfg.TOTPIssuer == "" {
|
||||
cfg.TOTPIssuer = "Jarl"
|
||||
}
|
||||
if log == nil {
|
||||
log = slog.Default()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user