package
Version:
v0.0.10
Opens a new window with list of versions in this module.
Published: Aug 14, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Compare compares the encrypted text with the plain text if it's the same
Encrypt encrypts the plain text with bcrypt.
Sign signs the payload with the specified secret.
type Payload struct {
UserID int
}
Payload is the data of the JSON web token.
主要是配合jwt来生成用户登录token
Parse validates the token with the specified secret,
and returns the payloads if the token was valid.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.