Documentation
¶
Index ¶
- Constants
- Variables
- func GetUserInfo(c *gin.Context) (types.Claims, types.Error)
- func Initialize()
- func IsAuthed(username string, password string) (bool, error)
- func IsEntitled(claims types.Claims, requirement string) bool
- func NewToken(username string, role string, id string) (string, types.Error)
- func RefreshToken(c *gin.Context) (string, types.Error)
Constants ¶
View Source
const TOKEN_VALID_TIME = 1 * time.Hour // TODO: Change to 5 minutes for prod
Variables ¶
View Source
var JWT_SIGNING_KEY []byte
Functions ¶
func Initialize ¶
func Initialize()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.