Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jwt ¶
type Jwt struct {
// contains filtered or unexported fields
}
Jwt is a JSON Web Token implementation.
type Payload ¶
type Payload struct { ID uuid.UUID `json:"id"` UserID uint `json:"user_id"` IsAdmin bool `json:"is_admin"` IsUsedAt time.Time `json:"isused_at"` ExpiredAt time.Time `json:"expired_at"` }
Payload contains the payload data of the token
func NewPayload ¶
NewPayload creates a new token payload with a specific user id, role, and duration
Click to show internal directories.
Click to hide internal directories.