Clients the host registers itself (for its own CLIs or partners).
{:ok, client, secret} = Sake.Auth.Clients.create(Sake.Auth.config(), %{name: "Ops CLI", redirect_uris: ["http://127.0.0.1:8765/callback"]})confidential: true returns a secret once; store it where the client
can read it. scopes: limits what the client may request.
Summary
Functions
Finds a client by id: a CIMD URL is fetched, anything else is looked up in the store.
Functions
@spec create(Sake.Auth.Config.t(), map()) :: {:ok, Sake.Auth.Client.t(), String.t() | nil} | {:error, map()}
@spec delete(Sake.Auth.Config.t(), String.t()) :: :ok
@spec get(Sake.Auth.Config.t(), String.t()) :: {:ok, Sake.Auth.Client.t()} | :error
@spec list(Sake.Auth.Config.t()) :: [Sake.Auth.Client.t()]
@spec resolve(Sake.Auth.Config.t(), term()) :: {:ok, Sake.Auth.Client.t()} | {:error, :invalid_client | :not_allowed | :unreachable | :invalid_document}
Finds a client by id: a CIMD URL is fetched, anything else is looked up in the store.