equinix-labs / metal-go

[Deprecated] Golang client for Equinix Metal
https://deploy.equinix.com/labs/equinix-sdk-go/
MIT License
3 stars 2 forks source link

Redact auth token in debug output #144

Closed displague closed 1 year ago

displague commented 1 year ago

Redacting the x-auth-token is behavior that was included in packngo.

X-Auth-Token: **REDACTED**

https://github.com/packethost/packngo/blob/d7f968e2791e84e64be19616765bee2503fef42a/packngo.go#L292-L306

Users converting to metal-go may expect similar behavior.

By templating the client or patching the generated client, we should be able to accomplish similar here: https://github.com/equinix-labs/metal-go/blob/7b8704ee594ed2713cb39587d2b985c10bab2022/metal/v1/client.go#L367-L374

ctreatma commented 1 year ago

Fixed in #167