intercepter

package
v0.0.0-...-d40265a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAuthenticated = fmt.Errorf("caller is not authenticated")
	ErrJWTParse         = fmt.Errorf("could not parse jwt token")
	ErrCorruptJWT       = fmt.Errorf("jwt could not be parsed (JWT might be corrupted)")
	ErrExpiredJWT       = fmt.Errorf("provided JWT has expired")
)

Functions

func WithSvcJwtAuth

func WithSvcJwtAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func WithUnary

func WithUnary(interceptor, next grpc.UnaryServerInterceptor) grpc.ServerOption

func WithUserJwtAuth

func WithUserJwtAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

Types

type CtxKey

type CtxKey string

TODO: must go in some ENV

Jump to

Keyboard shortcuts

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