authorizer/server/memorystore/providers/inmemory/provider.go

19 lines
402 B
Go
Raw Normal View History

2022-05-27 17:50:38 +00:00
package inmemory
import "sync"
type provider struct {
mutex sync.Mutex
sessionStore map[string]map[string]string
stateStore map[string]string
}
// NewInMemoryStore returns a new in-memory store.
func NewInMemoryProvider() (*provider, error) {
return &provider{
mutex: sync.Mutex{},
sessionStore: map[string]map[string]string{},
stateStore: map[string]string{},
}, nil
}