MCP.OAuth2.CredentialsStore (fnord v0.8.71)

View Source

Minimal credentials store for OAuth2 tokens.

  • JSON file at ~/.fnord/credentials.json
  • Atomic writes (.tmp + rename), final perms set to 0600
  • Per-server entries under the "servers" key

MVP: no encryption; keep tokens out of logs; caller is responsible for locking if needed.

Summary

Functions

delete(server)

@spec delete(String.t()) :: :ok | {:error, term()}

path()

@spec path() :: String.t()

read(server)

@spec read(String.t()) :: {:ok, map()} | {:error, :not_found | term()}

read_all()

@spec read_all() :: {:ok, map()} | {:error, term()}

write(server, token_map)

@spec write(String.t(), map()) :: :ok | {:error, term()}