jwt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClaims

type AuthClaims[T any] struct {
	jwt.RegisteredClaims

	AuthInfo T `json:"authInfo"`
}

type AuthService

type AuthService[T any] struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService[T any](jwtSecret, serviceName, claimSubject string, tokenTTL time.Duration) *AuthService[T]

func (*AuthService[T]) CreateToken

func (s *AuthService[T]) CreateToken(authInfo T) (string, error)

func (*AuthService[T]) ParseToken

func (s *AuthService[T]) ParseToken(tokenString string) (T, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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