Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool
UserIDHeader string
EmailHeader string
FirstNameHeader string
LastNameHeader string
DefaultLanguage string
}
Config controls dev header-based auth.
func LoadConfig ¶
LoadConfig reads dev-auth header config from environment.
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware injects an auth subject in local environments without Clerk.
func (*Middleware) Handler ¶
func (m *Middleware) Handler(next http.Handler) http.Handler
Handler attaches a subject from debug headers if Clerk is disabled.
func (*Middleware) OptionalHandler ¶
func (m *Middleware) OptionalHandler(next http.Handler) http.Handler
OptionalHandler attaches a subject from debug headers if present, otherwise allows anonymous access.
Click to show internal directories.
Click to hide internal directories.