MCPcopy
hub / github.com/docker/docker-agent / NewInMemoryTokenStore

Function NewInMemoryTokenStore

pkg/tools/mcp/tokenstore.go:129–133  ·  view source on GitHub ↗

NewInMemoryTokenStore creates a new in-memory token store

()

Source from the content-addressed store, hash-verified

127
128// NewInMemoryTokenStore creates a new in-memory token store
129func NewInMemoryTokenStore() OAuthTokenStore {
130 return &InMemoryTokenStore{
131 tokens: concurrent.NewMap[string, *OAuthToken](),
132 }
133}
134
135func (s *InMemoryTokenStore) GetToken(resourceURL string) (*OAuthToken, error) {
136 token, ok := s.tokens.Load(resourceURL)

Calls 1

NewMapFunction · 0.92