Documentation
¶
Overview ¶
Package consoleserver serves the admin console: first-admin setup, admin sign-in, account and invite administration and the app's settings over the server's database. It composes the identity service for the console audience; disabling or deleting an account notifies every diffx-server replica through the store.
Index ¶
- func Compose(store *pgstore.Store, settings Settings) *identityservice.Service
- func Handler(store *pgstore.Store, settings Settings, assets fs.FS) http.Handler
- func Open(ctx context.Context, databaseURL string) (*pgstore.Store, error)
- func ResetPassword(ctx context.Context, store *pgstore.Store, settings Settings, email string) (string, error)
- func Run(ctx context.Context, settings Settings, ready func(string)) error
- type GoogleSettings
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compose ¶
func Compose(store *pgstore.Store, settings Settings) *identityservice.Service
Compose returns the identity service for store with the console's Google client, whose callback is on the console origin.
Types ¶
type GoogleSettings ¶
type Settings ¶
type Settings struct {
Listen string
// DatabaseURL selects the server's Postgres database; never logged.
DatabaseURL string
// PublicURL is the console's browser-facing origin, used in the setup link,
// admin reset links and the Google callback. Unset, links use the listener.
PublicURL string
// AppURL is the app's origin, used in invite and member reset links.
AppURL string
InsecureCookies bool
// Google enables console Google sign-in for existing admins and Google
// first-admin setup; it requires PublicURL.
Google *GoogleSettings
// ClientIPHeader names the header a trusted ingress sets to the client IP.
// Non-empty enables authentication rate limiting shared by every replica.
ClientIPHeader string
}
Click to show internal directories.
Click to hide internal directories.