Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtGenerator ¶
func NewJwtGenrator ¶
func NewJwtGenrator[T any](key []byte, container T) (jg *JwtGenerator[T], err error)
生成Jwt生成器
func (*JwtGenerator[T]) Refresh ¶ added in v0.2.10
func (g *JwtGenerator[T]) Refresh(token []byte, opt SignOption) (newToken []byte, err error)
func (*JwtGenerator[T]) Sign ¶ added in v0.0.12
func (g *JwtGenerator[T]) Sign(u T, opt SignOption) (token []byte, err error)
type SignOption ¶ added in v0.2.4
type SignOption struct {
ExpMinute int // 如果不设置,将使用JwtGenerator的ExpMinute
}
Click to show internal directories.
Click to hide internal directories.