RouteIdentityBinding
data class RouteIdentityBinding(val pathVariables: Set<String>, val tenantId: FactBinding, val ownerId: FactBinding, val aggregateId: FactBinding, val spaceId: FactBinding, val requestId: FactBinding, val spaceHeaders: List<String>)
Where one route takes each identity fact from, decided once from the route contract when the router is materialized: the path variables the contract declares, the aggregate's static tenant, ownership policy and space, and the header aliases. Each value is then decided by IdentityResolver, so the route, not each handler, states which source is authoritative:
| Fact | Source |
|---|---|
| tenant | static tenant (the header is ignored) → {tenantId} → Command-Tenant-Id |
| owner | {ownerId} → {id} when the owner is the aggregate ID → Command-Owner-Id |
| aggregate ID | owner is the aggregate ID: {ownerId} → {id} → owner header → Command-Aggregate-Id; otherwise {id} → Command-Aggregate-Id |
| space | spaced aggregate only: Wow-Space-Id → space aliases |
| request ID | Command-Request-Id → request ID aliases |
A declared path variable is authoritative: blank is rejected (400), and a header (or a command body, see RequestIdentity) contradicting a tenant or owner the path fixes is rejected (400, V3). A command body contradicting the static tenant is rejected too; a tenant header there is ignored, as before 9.3.0.
Constructors
Link copied to clipboard
constructor(pathVariables: Set<String>, tenantId: FactBinding, ownerId: FactBinding, aggregateId: FactBinding, spaceId: FactBinding, requestId: FactBinding, spaceHeaders: List<String>)