jwt

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: GPL-3.0 Imports: 8 Imported by: 1

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(
	interceptions map[string]*gojwttoken.Token,
	logger *slog.Logger,
) (*Interceptor, error)

NewInterceptor creates a new authentication interceptor

Parameters:

  • interceptions: the gRPC interceptions to determine which methods require authentication
  • options: the options for the interceptor

Returns:

  • *Interceptor: the interceptor
  • error: an error if the gRPC interceptions is nil or any other error occurs

func (Interceptor) Verify

Verify returns a new unary client interceptor that verifies the authentication metadata from the context is set if needed

Returns:

  • grpc.UnaryClientInterceptor: the interceptor

Jump to

Keyboard shortcuts

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