middleware

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CorrelationIDHeader = "X-Correlation-ID"

Variables

This section is empty.

Functions

func Authentication

func Authentication(
	authInfoParser AuthInfoParser,
	identityProvider IdentityProvider,
) func(http.Handler) http.Handler

func CFCliVersion

func CFCliVersion(next http.Handler) http.Handler

func CFUser

func CFUser(
	nsPermissionChecker NamespacePermissionChecker,
	identityProvider IdentityProvider,
	cfRootNamespace string,
	cfUserCache *cache.Expiring,
) func(http.Handler) http.Handler

func Correlation

func Correlation(logger logr.Logger) func(http.Handler) http.Handler

func HTTPLogging

func HTTPLogging(next http.Handler) http.Handler

Types

type AuthInfoParser

type AuthInfoParser interface {
	Parse(authHeader string) (authorization.Info, error)
}

type IdentityProvider

type IdentityProvider interface {
	GetIdentity(context.Context, authorization.Info) (authorization.Identity, error)
}

type NamespacePermissionChecker added in v0.7.0

type NamespacePermissionChecker interface {
	AuthorizedIn(context.Context, authorization.Identity, string) (bool, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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