Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthHandlerWrapper ¶
type AuthHandlerWrapper struct { // Original handler Handler http.Handler // Authn function Auth *oidc.Authn // The wrapper will use this to log events and errors. Logger *slog.Logger }
Handler wraps another handler with authn and authz functions.
With otel, this is already wrapped in a telemetry wrapper, ctx can be used for tracing. The otel http instrumentation currently doesn't allow other interactions.
func (*AuthHandlerWrapper) ServeHTTP ¶
func (h *AuthHandlerWrapper) ServeHTTP(writer http.ResponseWriter, request *http.Request)
Entry point for H1, H2 - will delegate to the real handler after authenticating. Also keeps track of the request time and logs the request.
Click to show internal directories.
Click to hide internal directories.