start to move session stores into there own key value in memory store

This commit is contained in:
Gregory Wells
2026-06-08 18:16:07 -04:00
parent 3b31adf3e2
commit f6016bbdb1
9 changed files with 62 additions and 60 deletions
-7
View File
@@ -2,7 +2,6 @@ package session
import (
"crypto/rand"
"crypto/sha256"
"encoding/base64"
)
@@ -16,9 +15,3 @@ func GenerateSessionToken(length int) (string, error) {
token := base64.RawURLEncoding.EncodeToString(b)
return token, nil
}
// more helper
func hashSession(session_id string) string {
tokenEncoded := sha256.Sum256([]byte(session_id))
return base64.RawURLEncoding.EncodeToString(tokenEncoded[:])
}