2021-07-16 20:08:11 +08:00
|
|
|
package request
|
|
|
|
|
|
|
|
import (
|
2022-09-13 16:26:02 +08:00
|
|
|
jwt "github.com/golang-jwt/jwt/v4"
|
2021-07-16 20:08:11 +08:00
|
|
|
uuid "github.com/satori/go.uuid"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Custom claims structure
|
|
|
|
type CustomClaims struct {
|
2021-10-25 22:19:06 +08:00
|
|
|
BaseClaims
|
|
|
|
BufferTime int64
|
|
|
|
jwt.StandardClaims
|
|
|
|
}
|
|
|
|
|
|
|
|
type BaseClaims struct {
|
2021-07-16 20:08:11 +08:00
|
|
|
UUID uuid.UUID
|
|
|
|
ID uint
|
|
|
|
Username string
|
|
|
|
NickName string
|
2022-06-29 22:12:53 +08:00
|
|
|
AuthorityId uint
|
2021-07-16 20:08:11 +08:00
|
|
|
}
|