Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTAccessGenerate ¶
type JWTAccessGenerate struct { Client *redis.Client SignedMethod jwt.SigningMethod }
JWTAccessGenerate generate the jwt access token
type TokenGenerate ¶
type TokenGenerate interface { Token(userid int64, role, username string, expired time.Duration) (string, error) Verify(ctx context.Context, token string) (*model.UserInfo, bool) }
func NewJWTAccessGenerate ¶
func NewJWTAccessGenerate(cli *redis.Client, method jwt.SigningMethod) TokenGenerate
NewJWTAccessGenerate create to generate the jwt access token instance
Click to show internal directories.
Click to hide internal directories.