Documentation
¶
Overview ¶
Package mgmtapi mounts the spec-driven Management API surface onto chi: one generic, bearer-protected handler per Auth0 Management API operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenericHandler ¶
type GenericHandler struct {
Op spec.Operation
Validator *spec.Validator
Store *matches.Store
Log zerolog.Logger
Strict bool
}
GenericHandler is the main spec-driven handler for a Management API operation.
func (*GenericHandler) ServeHTTP ¶
func (h *GenericHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MountOpts ¶
type MountOpts struct {
Router chi.Router
Spec *spec.Spec
Validator *spec.Validator
Store *matches.Store
Keys *jwks.KeySet
Log zerolog.Logger
Strict bool // SPEC_VALIDATION_STRICT.
// RequireAudience, when non-empty, makes the bearer middleware reject
// tokens whose `aud` claim doesn't contain this value. Empty = no
// audience enforcement (the documented default).
RequireAudience string
// EventsHandler replaces the generic stub-driven handler for the
// subscribe_events operation (GET /events). When non-nil, Mount
// registers bearerMW(EventsHandler) for that one route. When nil,
// the generic handler is used (the old behaviour — useful in tests
// that don't care about the SSE surface).
EventsHandler http.Handler
}
MountOpts is the parameter object for Mount.
Click to show internal directories.
Click to hide internal directories.