middleware

package
v4.0.5-alpha2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HTTPMetaJwtClientApp constant
	HTTPMetaJwtClientApp = "JwtClientApp"
	// HTTPMetaJwtIssuer constant
	HTTPMetaJwtIssuer = "JwtIssuer"
)

Functions

func ClientConnIncomingContext

func ClientConnIncomingContext(serverRuntimeContext context.Context) func(ctx context.Context) (context.Context, bool, error)

ClientConnIncomingContext adds the ClientConn to context

func HttpWrapperJWT

func HttpWrapperJWT(ctx context.Context, h http.Handler) http.Handler

HttpWrapperJWT captures and verifies a JWT token if it's present in the headers. Warning: it goes through if there is no JWT => the next handlers must verify if a valid user was found or not.

func HttpWrapperPolicy

func HttpWrapperPolicy(ctx context.Context, h http.Handler) http.Handler

HttpWrapperPolicy applies relevant policy rules and blocks the request if necessary

func RegistryIncomingContext

func RegistryIncomingContext(serverRuntimeContext context.Context) func(ctx context.Context) (context.Context, bool, error)

RegistryIncomingContext injects the registry in context

func TargetNameToServiceNameContext

func TargetNameToServiceNameContext(serverRuntimeContext context.Context) func(ctx context.Context) (context.Context, bool, error)

TargetNameToServiceNameContext extracts service name from grpc meta "targetname" and inject it in the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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