program

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CNFMDURL                  = "MetadataURL"
	CNFMDDefaultCacheTTL      = "MetadataDefaultCacheTTL"
	CNFMDNetworkRetry         = "MetadataNetworkRetry"
	CNFMDBadContentRetry      = "MetadataBadContentRetry"
	CNFMDCachePath            = "MetadataCachePath"
	CNFReadHeaderTimeout      = "ReadHeaderTimeout"
	CNFReadTimeout            = "ReadTimeout"
	CNFWriteTimeout           = "WriteTimeout"
	CNFIdleTimeout            = "IdleTimeout"
	CNFBackendTimeout         = "BackendTimeout"
	CNFEnableLimiting         = "EnableLimiting"
	CNFLimitRequestsPerSecond = "LimitRequestsPerSecond"
	CNFLimitBurst             = "LimitBurst"
	CNFStorageType            = "StorageType"
	CNFStorageSource          = "StorageSource"
	CNFAccessLogPath          = "AccessLogPath"
	CNFJWKSPath               = "JWKSPath"
	CNFCert                   = "Cert"
	CNFKey                    = "Key"
	CNFListenAddress          = "ListenAddress"
	CNFAdminListenAddress     = "AdminListenAddress"
	CNFMDEntityID             = "MetadataEntityID"
	CNFMDBaseURI              = "MetadataBaseURI"
	CNFMDOrganization         = "MetadataOrganization"
	CNFMDOrganizationID       = "MetadataOrganizationID"
	CNFValidateUUID           = "ValidateUUID"
	CNFValidateSchoolUnitCode = "ValidateSchoolUnitCode"
	CNFLogFilePath            = "LogPath"
	CNFSkolsynkListenAddress  = "SkolsynkListenAddress"
	CNFSkolsynkAuthHeader     = "SkolsynkAuthHeader"
	CNFSkolsynkCert           = "SkolsynkCert"
	CNFSkolsynkKey            = "SkolsynkKey"
	CNFSkolsynkClients        = "SkolsynkClients"
)

Configuration parameters

Variables

This section is empty.

Functions

func APIKeyAuthMiddleware

func APIKeyAuthMiddleware(h http.Handler, headerName string, clients map[string]string) http.Handler

APIKeyAuthMiddleware provides authentication middleware for API keys. headerName is the HTTP header to use for the API key. clients is a map from tenant names to API keys.

func APIKeyAuthenticatedTenantFromContext

func APIKeyAuthenticatedTenantFromContext(ctx context.Context) *string

Gets the tenant from context if the client has authenticated with API key Returns nil if the client hasn't authenticated with API key

func Limiter

func Limiter(h http.Handler, tenantGetter scimserverlite.TenantGetter, r rate.Limit, b int) http.Handler

Limiter returns a middleware with token bucket rate limiting applied per tenant

func Main

func Main(ext Extension)

func PanicReportTimeoutHandler

func PanicReportTimeoutHandler(h http.Handler, dt time.Duration, msg string) http.Handler

PanicReportTimeoutHandler works like http.TimeoutHandler except stack traces are logged when there's a panic.

Types

type Extension

type Extension interface {
	ParametersOfInterest() []string
	Start(parameters map[string]interface{}, w *windermere.Windermere)
	Stop()
}

Jump to

Keyboard shortcuts

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