middleware

package
v2.14.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ClusterProviderContextKey key under which the current ClusterProvider is kept in the ctx
	ClusterProviderContextKey kubermaticcontext.Key = "cluster-provider"

	// PrivilegedClusterProviderContextKey key under which the current PrivilegedClusterProvider is kept in the ctx
	PrivilegedClusterProviderContextKey kubermaticcontext.Key = "privileged-cluster-provider"

	// UserInfoContextKey key under which the current UserInfoExtractor is kept in the ctx
	UserInfoContextKey kubermaticcontext.Key = "user-info"

	// AuthenticatedUserContextKey key under which the current User (from OIDC provider) is kept in the ctx
	AuthenticatedUserContextKey kubermaticcontext.Key = "authenticated-user"

	// AddonProviderContextKey key under which the current AddonProvider is kept in the ctx
	AddonProviderContextKey kubermaticcontext.Key = "addon-provider"

	// PrivilegedAddonProviderContextKey key under which the current PrivilegedAddonProvider is kept in the ctx
	PrivilegedAddonProviderContextKey kubermaticcontext.Key = "privileged-addon-provider"

	UserCRContextKey = kubermaticcontext.UserCRContextKey
)

Variables

This section is empty.

Functions

func Addons

func Addons(addonProviderGetter provider.AddonProviderGetter, seedsGetter provider.SeedsGetter) endpoint.Middleware

Addons is a middleware that injects the current AddonProvider into the ctx

func PrivilegedAddons

func PrivilegedAddons(addonProviderGetter provider.AddonProviderGetter, seedsGetter provider.SeedsGetter) endpoint.Middleware

PrivilegedAddons is a middleware that injects the current PrivilegedAddonProvider into the ctx

func SetClusterProvider

func SetClusterProvider(clusterProviderGetter provider.ClusterProviderGetter, seedsGetter provider.SeedsGetter) endpoint.Middleware

SetClusterProvider is a middleware that injects the current ClusterProvider into the ctx

func SetPrivilegedClusterProvider

func SetPrivilegedClusterProvider(clusterProviderGetter provider.ClusterProviderGetter, seedsGetter provider.SeedsGetter) endpoint.Middleware

SetPrivilegedClusterProvider is a middleware that injects the current ClusterProvider into the ctx

func TokenExtractor

func TokenExtractor(o auth.TokenExtractor) transporthttp.RequestFunc

TokenExtractor knows how to extract a token from the incoming request

func TokenVerifier

func TokenVerifier(tokenVerifier auth.TokenVerifier) endpoint.Middleware

TokenVerifier knows how to verify a token from the incoming request

func UserInfoUnauthorized

func UserInfoUnauthorized(userProjectMapper provider.ProjectMemberMapper, userProvider provider.UserProvider) endpoint.Middleware

UserInfoUnauthorized tries to build userInfo for not authenticated (token) user instead it reads the user_id from the request and finds the associated user in the database

func UserSaver

func UserSaver(userProvider provider.UserProvider) endpoint.Middleware

UserSaver is a middleware that checks if authenticated user already exists in the database next it creates/retrieve an internal object (kubermaticv1.User) and stores it the ctx under UserCRContexKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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