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
Click to show internal directories.
Click to hide internal directories.