middleware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateServiceHTTP

func AuthenticateServiceHTTP(handler http.Handler, config *AuthenticateServiceConfig) http.Handler

func GenerateServiceAuthenticationPayload

func GenerateServiceAuthenticationPayload(serviceName string, serviceAuthPrivateKeys []string) (string, error)

Types

type AuthenticateServiceConfig

type AuthenticateServiceConfig struct {
	Cache                 cache.Cache
	ServiceAuthPublicKeys []string
}

func (*AuthenticateServiceConfig) AuthenticateServiceGrpc

func (config *AuthenticateServiceConfig) AuthenticateServiceGrpc(ctx context.Context, req any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

Jump to

Keyboard shortcuts

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