Documentation ¶
Index ¶
- func CreateAccessToken(user *model.User, secret string, expiry int) (accessToken string, err error)
- func CreateRefreshToken(user *model.User, secret string, expiry int) (refreshToken string, err error)
- func ExtractAccessLevelFromToken(requestToken string, secret string) (accessLevel string, err error)
- func ExtractClaimsFromToken(requestToken string, secret string) (*model.JwtCustomClaims, error)
- func ExtractRoleIDs(c *gin.Context, secret string) ([]uint, error)
- func ExtractUserID(c *gin.Context, secret string) (uint, error)
- func ExtractUserIDFromToken(token string, secret string) (uint, error)
- func GetAuthToken(c *gin.Context) (token string, err error)
- func IsAuthenticated(requestToken string, secret string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccessToken ¶
func CreateRefreshToken ¶
func ExtractClaimsFromToken ¶
func ExtractClaimsFromToken(requestToken string, secret string) (*model.JwtCustomClaims, error)
func ExtractUserIDFromToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.