Omit a consumer's identity where there is none
A contribution that is not a credential grant — a module offering something to another on its own machine — has nobody to be identified to, and was carrying an empty `as`. A field that is always present and usually empty teaches a reader to ignore it, including when it is not.
This commit is contained in:
@@ -396,7 +396,10 @@ type Contribution struct {
|
||||
// used to be neither — the provisioner made a name, and the consumer, which has to present it
|
||||
// to authenticate, had no way to learn it. One derivation reaches both ends, so they agree by
|
||||
// construction.
|
||||
As string `json:"as"`
|
||||
// Omitted when there is none. A contribution that is not a credential grant — a module
|
||||
// offering something to another on its own machine — has nobody to be identified to, and a
|
||||
// field that is always present and usually empty teaches a reader to ignore it.
|
||||
As string `json:"as,omitempty"`
|
||||
// Secret is the file on this machine holding that consumer's credential, sealed to it.
|
||||
//
|
||||
// Named rather than carried, for the same reason the private network's key is: the mesh
|
||||
|
||||
Reference in New Issue
Block a user