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( validator gojwtvalidator.Validator, interceptions map[string]*gojwttoken.Token, ) (*Interceptor, error)
NewInterceptor creates a new authentication interceptor
Parameters:
- validator: the JWT validator to validate the tokens
- interceptions: the gRPC interceptions to determine which methods require authentication
Returns:
- *Interceptor: the interceptor
- error: if there was an error creating the interceptor
func (Interceptor) Authenticate ¶
func (i Interceptor) Authenticate() grpc.UnaryServerInterceptor
Authenticate returns the authentication interceptor
Returns:
- grpc.UnaryServerInterceptor: the authentication interceptor
Click to show internal directories.
Click to hide internal directories.