Fixing token size issue (#6258)

This commit is contained in:
Christopher Speller
2017-04-27 16:22:46 -04:00
committed by GitHub
parent fb3cc12f56
commit bd9acee72b
2 changed files with 2 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ package model
import "net/http"
const (
TOKEN_SIZE = 128
TOKEN_SIZE = 64
MAX_TOKEN_EXIPRY_TIME = 1000 * 60 * 60 * 24 // 24 hour
)

View File

@@ -21,6 +21,7 @@ func NewSqlTokenStore(sqlStore *SqlStore) TokenStore {
for _, db := range sqlStore.GetAllConns() {
table := db.AddTableWithName(model.Token{}, "Tokens").SetKeys(false, "Token")
table.ColMap("Token").SetMaxSize(64)
table.ColMap("Type").SetMaxSize(64)
table.ColMap("Extra").SetMaxSize(128)
}