golibsecTestUtil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JwtTestUtilOpt

func JwtTestUtilOpt() fx.Option

Types

type JwtTestProperties

type JwtTestProperties struct {
	PrivateKey string
}

func NewJwtTestProperties

func NewJwtTestProperties(loader config.Loader) (*JwtTestProperties, error)

func (*JwtTestProperties) Prefix

func (j *JwtTestProperties) Prefix() string

type JwtTestUtil

type JwtTestUtil struct {
	// contains filtered or unexported fields
}

func NewJwtTestUtil

func NewJwtTestUtil(jwtProperties *JwtTestProperties) (*JwtTestUtil, error)

func (*JwtTestUtil) CreateJwtToken

func (s *JwtTestUtil) CreateJwtToken(userId string) string

CreateJwtToken return a new jwt token

func (*JwtTestUtil) LoadJwtPrivateKey

func (s *JwtTestUtil) LoadJwtPrivateKey() error

LoadJwtPrivateKey load jwt config from properties

Jump to

Keyboard shortcuts

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