Add Suspicious state for detecting unusual session activity

This commit is contained in:
2024-09-20 22:44:11 +07:00
parent 29a75b7286
commit 557e7313b2
4 changed files with 35 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package logoutHandler
import (
"errors"
"github.com/fossyy/filekeeper/app"
"github.com/fossyy/filekeeper/types"
"net/http"
@ -26,12 +27,12 @@ func GET(w http.ResponseWriter, r *http.Request) {
err = storeSession.Delete()
if err != nil {
panic(err)
app.Server.Logger.Error(err)
return
}
err = session.RemoveSessionInfo(userSession.Email, cookie.Value)
if err != nil {
panic(err)
app.Server.Logger.Error(err)
return
}