Documentation ¶
Overview ¶
https://dev.to/techschoolguru/use-grpc-interceptor-for-authorization-with-jwt-1c5h
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, match func(e T) bool) bool
Types ¶
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
func NewAuthInterceptor ¶
func NewAuthInterceptor(extractor token.Extractor, jwtManager *token.JWTManager, accessibleRoles map[string][]string) *AuthInterceptor
func (*AuthInterceptor) Stream ¶
func (interceptor *AuthInterceptor) Stream() grpc.StreamServerInterceptor
func (*AuthInterceptor) Unary ¶
func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.