Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor is the interceptor for the authentication
func NewInterceptor ¶
func NewInterceptor( methodsToIntercept []string, logger *slog.Logger, ) (*Interceptor, error)
NewInterceptor creates a new authentication interceptor
Parameters:
- methodsToIntercept: a slice of method names to intercept
- logger: the logger to use for logging
Returns:
- *Interceptor: the interceptor
- error: an error if the interceptions map is nil
func (Interceptor) Verify ¶
func (i Interceptor) Verify() grpc.UnaryClientInterceptor
Verify returns a new unary client interceptor that verifies the authentication metadata from the context is set if needed
Returns:
- grpc.UnaryClientInterceptor: the interceptor
Click to show internal directories.
Click to hide internal directories.