auth

package
v0.0.0-...-69b9976 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTokenNotValid = errors.New("jwt token is no longer valid")
	ErrParsingToken  = errors.New("error parsing jwt token")
)

Functions

func GenerateToken

func GenerateToken(username string) (string, error)

func InterceptorLogger

func InterceptorLogger(l *slog.Logger) logging.Logger

func UnaryInterceptorLogger

func UnaryInterceptorLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func ValidateToken

func ValidateToken(token string) (string, error)

Types

type Claims

type Claims struct {
	User string
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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