Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWT ¶
type JWT struct {
CookieName string // Name of the cookie to store the JWT
Secret string // Secret key used to sign the JWT
TokenTTL time.Duration // Token time-to-live duration
}
JWT handles JWT token creation, validation, and cookie management.
func (*JWT) GenerateToken ¶
GenerateToken creates a signed JWT token containing the user's email and expiration.
Click to show internal directories.
Click to hide internal directories.