ClientInfo¶
ClientInfo is a plain, unvalidated DTO that the consuming application supplies to JsonHttpClient so every outbound request can be tagged with the calling machine, application, and user (BR-CLI-002). It performs no validation of its own; the values are copied verbatim into request headers by JsonHttpClient.GetJsonResponse.
Purpose¶
- Carry caller-identity values (
MachineName,ApplicationId,UserId) thatJsonHttpClientcopies into theClient-Name,Application-ID, andClient-Userrequest headers on every call.
Context¶
- Namespace:
SAIF.Web.API.Clients - Assembly/package:
SAIF.Web.API.Clients(NuGet packageSAIF.Web.API.Clients)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
MachineName |
string { get; set; } |
The calling machine's name; copied into the Client-Name request header. |
ApplicationId |
string { get; set; } |
The calling application's identifier; copied into the Application-ID request header. |
UserId |
string { get; set; } |
The calling user's identifier; copied into the Client-User request header. This is a caller-supplied assertion, not a verified identity — the receiving API must establish its own trust for this value*. |
Behavioral notes¶
- All three properties are plain mutable auto-properties with no validation and no defaults; a
nullClientInfoinstance passed toJsonHttpClientthrowsNullReferenceExceptionwhen headers are added, and individualnullproperty values are added to headers as-is.
Constraints and usage notes¶
- Consumers are responsible for populating meaningful values; this type enforces no format or non-null constraint.
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
src/SAIF.Web.API.Clients/ClientInfo.cs