Keep sessions for 7 days

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2020-04-20 13:50:28 +02:00
parent 9f188a7b93
commit 4bd0ca4ac6
8 changed files with 122 additions and 33 deletions

View File

@@ -10,7 +10,7 @@ import (
"github.com/gorilla/websocket"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/internal/session"
"github.com/photoprism/photoprism/internal/service"
"github.com/photoprism/photoprism/pkg/rnd"
)
@@ -54,7 +54,7 @@ func wsReader(ws *websocket.Conn, writeMutex *sync.Mutex, connId string, conf *c
if err := json.Unmarshal(m, &info); err != nil {
log.Error(err)
} else {
if session.Exists(info.SessionToken) {
if service.Session().Exists(info.SessionToken) {
log.Debug("websocket: authenticated")
wsAuth.mutex.Lock()