feat: introduce AuthState enum for authentication state

This commit is contained in:
Prad Nukala
2024-10-11 19:03:14 -04:00
parent 9a3c8e000b
commit 58aa71997d
4 changed files with 28 additions and 47 deletions
+10
View File
@@ -45,6 +45,16 @@ func SessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
}
}
func defaultSession(id string, s *sessions.Session) *session {
return &session{
session: s,
id: id,
origin: "",
address: "",
chainID: "",
}
}
func getSessionID(ctx context.Context) (string, error) {
sessionID, ok := ctx.Value(ctxKeySessionID{}).(string)
if !ok || sessionID == "" {