start to move session stores into there own key value in memory store
This commit is contained in:
@@ -6,12 +6,13 @@ import (
|
||||
"time"
|
||||
|
||||
"astraltech.xyz/accountmanager/src/logging"
|
||||
"astraltech.xyz/accountmanager/src/store"
|
||||
)
|
||||
|
||||
const SessionCookieName = "session_token"
|
||||
|
||||
type SessionManager struct {
|
||||
store SessionStore
|
||||
store store.Store[string, *SessionData]
|
||||
}
|
||||
|
||||
var instance *SessionManager
|
||||
@@ -93,6 +94,7 @@ func (manager *SessionManager) GetSession(r *http.Request) (*SessionData, error)
|
||||
if err != nil {
|
||||
return nil, ErrSessionNotFound
|
||||
}
|
||||
// TODO: handle token expiry here
|
||||
return data, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user