package
0.0.0-20250106230832-9a330938ded7
Repository: https://github.com/edgeflare/pgo.git
Documentation: pkg.go.dev
# Functions
Apply applies all registered middleware functions to the given handler.
NewBasicAuthCreds creates a new instance of BasicAuthConfig with multiple username/password pairs.
CORSWithOptions creates a CORS middleware with the provided configuration.
Retrieve log metadata from context.
No description provided by the author
No description provided by the author
NewCache creates a new Cache.
No description provided by the author
WithAnonAuthz returns an authorization function for anonymous users.
WithBasicAuthz returns an authorization function for Basic Auth.
PgOIDCAuthz is the main authorization function.
Postgres middleware attaches a connection from pool to the request context if the http request user is authorized.
Serve creates a reverse proxy handler based on the given target and options.
Register adds one or more middleware function to the registry.
RequestID middleware generates a unique request ID and tracks request duration.
Static returns an http.Handler that serves static files.
VerifyBasicAuth is a middleware function for basic authentication.
VerifyOIDCToken is middleware that verifies OIDC tokens in Authorization headers.
# Constants
No description provided by the author
# Structs
AuthzResponse represents the result of an authorization check.
BasicAuthConfig holds the username-password pairs for basic authentication.
Cache is a simple in-memory cache with expiration.
CORSOptions defines configuration for CORS.
LoggerOptions defines configuration for the logger middleware.
OIDCProvider is the main OIDC provider.
OIDCProviderConfig holds the configuration for the OIDC provider.
Options holds the options for the proxy server.
ResponseRecorder is a wrapper for http.ResponseWriter to capture status codes and durations.
# Type aliases
AuthzFunc defines the function signature for authorization checks.
Middleware is a function that wraps an HTTP handler.