mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
feat: introduce AuthState enum for authentication state
This commit is contained in:
@@ -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 == "" {
|
||||
|
||||
Reference in New Issue
Block a user