mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
extended token length
This commit is contained in:
@@ -111,7 +111,7 @@ func CreateToken(user *models.User) (string, error) {
|
|||||||
atClaims := jwt.MapClaims{}
|
atClaims := jwt.MapClaims{}
|
||||||
atClaims["authorized"] = true
|
atClaims["authorized"] = true
|
||||||
atClaims["id"] = user.Id
|
atClaims["id"] = user.Id
|
||||||
atClaims["exp"] = time.Now().Add(time.Minute).Unix()
|
atClaims["exp"] = time.Now().Add(time.Hour * 2).Unix()
|
||||||
|
|
||||||
secret := os.Getenv("ACCESS_SECRET")
|
secret := os.Getenv("ACCESS_SECRET")
|
||||||
if secret == "" {
|
if secret == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user