Documentation
¶
Overview ¶
Package jwt defines all the methods for JWT manipulation.
Index ¶
Constants ¶
View Source
const ExpiresDuration = 24 * time.Hour
ExpiresDuration is the duration when a user session expires.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
jwt.RegisteredClaims
UserID string `json:"user_id"`
UserName string `json:"user_name"`
}
Claims are the fields stored in a JWT.
type Secret ¶
type Secret []byte
Secret is a HMAC JWT secret used for signing.
Click to show internal directories.
Click to hide internal directories.