Backplane. McpProtocol. Client. Authorization. CredentialStore behaviour
(backplane_mcp_protocol v0.5.0)
Copy Markdown
Facade for persisted OAuth client credentials bound to an exact issuer.
Applications must configure a secure adapter that encrypts credentials at rest or stores them in a dedicated secret manager:
config :backplane_mcp_protocol, :authorization_credential_store,
adapter: MyApp.OAuthCredentialStoreThe facade does not keep credentials in application configuration, ETS, a process, or environment variables. Adapter configuration contains only connection and routing options; the adapter owns durable secure storage.
Summary
Callbacks
Fetches credentials for an exact {issuer, client_id} key.
Persists credentials for an exact {issuer, client_id} key.
Functions
Fetches credentials through the configured secure adapter.
Persists credentials through the configured secure adapter.
Types
Callbacks
@callback fetch(key(), adapter_opts()) :: {:ok, credentials()} | error()
Fetches credentials for an exact {issuer, client_id} key.
@callback put(key(), credentials(), adapter_opts()) :: :ok | error()
Persists credentials for an exact {issuer, client_id} key.
Functions
@spec fetch(String.t(), String.t(), keyword()) :: {:ok, credentials()} | error()
Fetches credentials through the configured secure adapter.
Tests and embedded callers may inject a store configuration with the
:store option. Production callers normally use the two-argument form.
@spec put(String.t(), String.t(), credentials(), keyword()) :: :ok | error()
Persists credentials through the configured secure adapter.