middlewares

package
v0.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClaimsContextKey contextKey = "claims"
)

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(disableHealthcheckLog bool) gin.HandlerFunc

LoggingMiddleware returns a gin middleware that logs requests, but can optionally skip logging for health check endpoints

Types

type OIDCAuthenticator

type OIDCAuthenticator interface {
	Middleware() gin.HandlerFunc
}

OIDCAuthenticator interface for authentication middleware

func NewOIDCAuthenticatorMiddleware

func NewOIDCAuthenticatorMiddleware(logger *zap.Logger, cfg config.Config) (OIDCAuthenticator, error)

NewOIDCAuthenticatorMiddleware creates a new OIDC authenticator middleware

type OIDCAuthenticatorImpl

type OIDCAuthenticatorImpl struct {
	// contains filtered or unexported fields
}

OIDCAuthenticatorImpl implements OIDC authentication

func (*OIDCAuthenticatorImpl) Middleware

func (auth *OIDCAuthenticatorImpl) Middleware() gin.HandlerFunc

Middleware returns the OIDC authentication middleware for OIDCAuthenticatorImpl

type OIDCAuthenticatorNoop

type OIDCAuthenticatorNoop struct{}

OIDCAuthenticatorNoop is a no-op authenticator for when auth is disabled

func (*OIDCAuthenticatorNoop) Middleware

func (auth *OIDCAuthenticatorNoop) Middleware() gin.HandlerFunc

Middleware returns a no-op middleware for OIDCAuthenticatorNoop

type Telemetry

type Telemetry interface {
	Middleware() gin.HandlerFunc
}

func NewTelemetryMiddleware

func NewTelemetryMiddleware(cfg config.Config, telemetry adkotel.OpenTelemetry, logger *zap.Logger) (Telemetry, error)

type TelemetryImpl

type TelemetryImpl struct {
	// contains filtered or unexported fields
}

func (*TelemetryImpl) Middleware

func (t *TelemetryImpl) Middleware() gin.HandlerFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL