Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider interface {
BeginAuth(http.ResponseWriter, *http.Request) error
CompleteAuth(http.ResponseWriter, *http.Request) (*AuthResult, error)
}
AuthProvider handles an external auth flow (e.g. OIDC). Each provider has a name (e.g. "ugent_oidc") used in routes and user records.
type AuthResult ¶
type AuthResult struct {
Match string // "username" or identifier scheme (e.g. "ugent_id")
Value string // the claim value (e.g. "abc123")
}
AuthResult is the outcome of a successful external auth flow. Match is either "username" (matched against bbl_users.username) or an identifier scheme name (matched against bbl_user_identifiers).
type Config ¶
type Config struct {
Logger *slog.Logger
Services *bbl.Services
RootURL string // public root URL (e.g. "https://biblio.ugent.be/bbl")
Dev bool // dev mode: serve assets from disk, re-read manifest on every request
// Auth — all nil-safe. Without auth, session is not created,
// User is always nil, and login/callback return 404.
// Keyed by provider name (e.g. "ugent_oidc").
Auth map[string]AuthProvider
HashSecret []byte // HMAC key for session cookie signing
Secret []byte // encryption key for session cookie
Secure bool // true = HTTPS-only cookies
Wire *catbird.Wire
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.