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 ¶
type TelemetryImpl ¶
type TelemetryImpl struct {
// contains filtered or unexported fields
}
func (*TelemetryImpl) Middleware ¶
func (t *TelemetryImpl) Middleware() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.