feat: jwt生成token
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type CustomClaims struct {
|
||||
BaseClaims
|
||||
BufferTime int64
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
type BaseClaims struct {
|
||||
UUID uuid.UUID
|
||||
ID uint
|
||||
Account string
|
||||
}
|
||||
Reference in New Issue
Block a user