Algostream_infrastructure_auth.PrincipalWho is making a request.
Deliberately lives here rather than in the network library: the dependency runs network -> auth and never back. Nothing in this library knows that HTTP exists — it takes strings and returns results — which is what makes it testable without a socket.
type t = | Anonymous| Key of {kid : string;public key id — safe to log and to write into an audit record
*)label : string;the operator's own description, as the keystore read at that moment
*)scopes : Scope.Set.t;}val kid : t -> stringThe key id, or "-" for Anonymous. Never None, because every audit record needs an actor column and a missing value there should read as "nobody" rather than as an absent field.
val label : t -> stringval scopes : t -> Scope.Set.thas t scope is Scope.satisfies against this principal's grants.
val to_assoc : t -> (string * string) listFlat fields for /api/whoami and for audit records. Contains no secret — by construction, since a principal never carries one.
val to_string : t -> string