ETS-backed GenServer for multi-tenant OAuth token storage with proactive refresh.
Stores tokens per {user_id, tenant_id}. Background timer proactively
refreshes tokens expiring within 5 minutes.
:ok = Xero.Auth.TokenStore.put("user-123", "tenant-456", tokens)
{:ok, tokens} = Xero.Auth.TokenStore.get("user-123", "tenant-456")
:ok = Xero.Auth.TokenStore.delete("user-123", "tenant-456")
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get(String.t(), String.t()) :: {:ok, Xero.Auth.Token.t()} | {:error, :not_found | Xero.Error.t()}
@spec put(String.t(), String.t(), Xero.Auth.Token.t()) :: :ok