Documentation
¶
Overview ¶
Package server is Fundarr's HTTP API and the web UI it serves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
HashPassword makes a PHC string, for the `fundarr hash-password` command.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Mode string // "password", "oidc", "proxy" or "none"
// Fixed credentials from the environment; when empty, the ones created
// in the UI (stored in Credentials) are used.
Username string
PasswordHash string // argon2id PHC string
Credentials credentials
ProxyHeader string // proxy mode: header carrying the user (Remote-User)
OIDCIssuer string
OIDCClientID string
OIDCClientSecret string
OIDCAllowedSubs []string
OIDCAllowedMails []string
// PublicURL is where users reach Fundarr (for the OIDC redirect).
PublicURL string
// OIDCAutoRedirect sends signed-out visitors straight to the provider:
// with a session there, they come back signed in without a click.
OIDCAutoRedirect bool
SessionKey []byte
SessionTTL time.Duration
}
Auth modes, like the *arr apps:
- password: a username and password created in the UI on first launch (or fixed by FUNDARR_PASSWORD_HASH);
- oidc: any OpenID Connect provider, with an allowlist;
- proxy: a reverse proxy authenticates and passes the user in a header;
- none: no login at all.
type Config ¶
type Config struct {
Engine *engine.Engine
Auth AuthConfig
Static fs.FS // the built UI; nil in tests
Version string
Log *slog.Logger
// Background is the context syncs started from the UI run in.
Background context.Context
// Demo: the data is made up (FUNDARR_DEMO); nothing reaches a platform.
Demo bool
}
Click to show internal directories.
Click to hide internal directories.