Interface IBowireUserStore
- Namespace
- Kuestenlogik.Bowire.Auth
- Assembly
- Kuestenlogik.Bowire.dll
Resolves on-disk storage paths for per-user Bowire state
(environments, recordings, collections, flows, &c.). The default
implementation returns the legacy single-user layout under
~/.bowire/; multi-tenant deployments (issue #28) swap in an
implementation that scopes paths by the authenticated user's sub
claim into ~/.bowire-server/users/<sub>/.
public interface IBowireUserStore
Remarks
Why a seam at all. Bowire stores per-user state through a
handful of static stores (Kuestenlogik.Bowire.EnvironmentStore,
Kuestenlogik.Bowire.RecordingStore, &c.) that hard-code paths like
~/.bowire/environments.json. Single-user mode is correct;
multi-tenant installs hit the ceiling of 'everyone shares one
~/.bowire/' the moment a second authenticated identity
arrives. This seam lets the path resolution become identity-aware
without ripping the stores apart -- the stores keep their static
shape and call through BowireUserContext for the
final path.
Scope. Phase A of the auth seam (IBowireAuthProvider, shipped) handles 'who is the caller?'. This seam handles 'where does their state live?'. SCIM 2.0 (Phase C) handles 'how do operators provision users in the first place?'. Each phase is shippable on its own; this one ships the contract + a default that preserves the current single-user behaviour, so installs that haven't opted into multi-tenant see zero change.
Methods
GetUserPath(string)
Absolute path to the file filename under the
active user's scope. Implementations are free to colocate users
(single shared dir, the default) or partition by identity
(per-user subdirectory, the multi-tenant case).
string GetUserPath(string filename)
Parameters
filenamestringTrailing-component file name without any directory prefix -- e.g.
"environments.json","recordings.json". Implementations decorate it with whatever path makes sense for their model.