authguard

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthProvider

func AuthProvider() gowdkauth.Provider

AuthProvider returns a Provider that resolves the session manager lazily on the first request. The generated app registers the provider from its init() hook, which runs before the app's env-contract validation. Building Sessions here (as the previous MustAuthProvider did) would panic on a missing or too-short GOWDK_AUTH_SESSION_SECRET and crash with a stack trace instead of the clean startup error. Deferring construction to Principal keeps secret misconfiguration on the normal validation path.

func LoadDashboard

func LoadDashboard(ctx ssr.LoadContext) (map[string]any, error)

func Login

func Login(_ context.Context, values form.Values) (response.Response, error)

func RequireSession

func RequireSession(ctx guard.Context) error

func Sessions

func Sessions() (*gowdkauth.Sessions, error)

Types

type DashboardData

type DashboardData struct {
	Email     string `json:"email"`
	Role      string `json:"role"`
	ExpiresAt string `json:"expiresAt"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL