go.bigb.es/curator

v1.4.3
Doc Versions Source

Functions

f func AuthMiddleware

src
func AuthMiddleware(adminToken string, oidcProvider *oidcauth.Provider, next http.Handler) http.Handler

AuthMiddleware protects admin routes with admin token and/or OIDC. Supports Bearer token in Authorization header, cookie-based sessions, and OIDC session cookies.

Types

T type APIHandler

src
type APIHandler struct {
	// contains filtered or unexported fields
}

APIHandler serves the REST API for module management.

f func NewAPI

src

NewAPI creates a new API handler.

m func (*APIHandler) ServeHTTP

src
func (h *APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes API requests.

T type Handler

src
type Handler struct {
	// contains filtered or unexported fields
}

Handler serves the admin UI.

f func New

src
func New(st *store.Store, version string) (*Handler, error)

New creates a new admin handler.

m func (*Handler) ServeHTTP

src
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes admin requests.

Source Files