refactor: rework oidc session storage

This commit is contained in:
Stavros
2026-05-31 20:10:53 +03:00
parent 82d21c3b28
commit 695feca71c
29 changed files with 668 additions and 1880 deletions
@@ -1,3 +1,7 @@
//go:build exclude
// temporary
package memory_test
import (
@@ -1,3 +1,7 @@
//go:build exclude
// temporary
package memory
import (
@@ -1,3 +1,7 @@
//go:build exclude
// temporary
package memory
import (
+9 -9
View File
@@ -1,3 +1,7 @@
//go:build exclude
// temporary
// Package memory provides an in-memory implementation of repository.Store for use in tests.
package memory
@@ -9,19 +13,15 @@ import (
// Store is a thread-safe in-memory implementation of repository.Store.
type Store struct {
mu sync.RWMutex
sessions map[string]repository.Session
oidcCodes map[string]repository.OidcCode
oidcTokens map[string]repository.OidcToken
oidcUsers map[string]repository.OidcUserinfo
mu sync.RWMutex
sessions map[string]repository.Session
oidcSessions map[string]repository.OidcSession
}
// New returns a new empty in-memory Store.
func New() repository.Store {
return &Store{
sessions: make(map[string]repository.Session),
oidcCodes: make(map[string]repository.OidcCode),
oidcTokens: make(map[string]repository.OidcToken),
oidcUsers: make(map[string]repository.OidcUserinfo),
sessions: make(map[string]repository.Session),
oidcSessions: make(map[string]repository.OidcSession),
}
}