Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogAndExit ¶
func StrPtr2Str ¶
Types ¶
type JwtClaims ¶
type JwtClaims struct {
UserId int32 `json:"user_id"`
Username string `json:"username"`
Authenticated bool `json:"authenticated"`
RefreshUUID string `json:"refresh_uuid"` // If 2FA is enabled, this will be false until the user has authenticated with TOTP
jwt.RegisteredClaims
}
func GetClaimsFromContext ¶
func GetClaimsFromContext(c echo.Context) *JwtClaims
type TokenDetails ¶
type TokenDetails struct {
AccessToken string
RefreshToken string
RefreshUUID string
AtExpires *jwt.NumericDate
RtExpires *jwt.NumericDate
}
func GenerateToken ¶
func GenerateToken(claims *JwtClaims) (*TokenDetails, error)
Click to show internal directories.
Click to hide internal directories.