A big refactoring for how sessions are handled, Api calls that authenticate with api key will no longer create a new session

This commit is contained in:
Torkel Ödegaard
2015-04-07 19:21:14 +02:00
parent 00a713c42e
commit c07d48d930
5 changed files with 192 additions and 61 deletions

View File

@@ -254,6 +254,7 @@ func readSessionConfig() {
SessionOptions.Secure = sec.Key("cookie_secure").MustBool()
SessionOptions.Gclifetime = Cfg.Section("session").Key("gc_interval_time").MustInt64(86400)
SessionOptions.Maxlifetime = Cfg.Section("session").Key("session_life_time").MustInt64(86400)
SessionOptions.IDLength = 16
if SessionOptions.Provider == "file" {
os.MkdirAll(path.Dir(SessionOptions.ProviderConfig), os.ModePerm)