auth

package
v0.6.31 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetadataNotProvidedError = status.Error(
		codes.Unauthenticated, "metadata is not provided",
	)
	GRPCInterceptionsNilError = errors.New("nil gRPC interceptions map")
)

Functions

This section is empty.

Types

type Authentication

type Authentication interface {
	Authenticate() grpc.UnaryServerInterceptor
}

Authentication interface

type Interceptor

type Interceptor struct {
	// contains filtered or unexported fields
}

Interceptor is the interceptor for the authentication

func NewInterceptor

func NewInterceptor(
	validator commonvalidator.Validator,
	grpcInterceptions *map[pbtypes.GRPCMethod]pbtypes.Interception,
) (*Interceptor, error)

NewInterceptor creates a new authentication interceptor

func (*Interceptor) Authenticate

func (i *Interceptor) Authenticate() grpc.UnaryServerInterceptor

Authenticate returns the authentication interceptor

func (*Interceptor) GetMethodName

func (i *Interceptor) GetMethodName(fullMethod string) string

GetMethodName gets the method name from the full method

Jump to

Keyboard shortcuts

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