Documentation
¶
Overview ¶
Package heldcredentials keeps every credential this process has held, so that no log line or status output carries one, whatever a provider sends back. Code that reads or receives a credential remembers it; the proxy log, the command line's output and the menu snapshot remove every remembered credential on the way out. Code that writes a log line or an error needs to do nothing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Remember ¶
func Remember(credentials ...string)
Remember adds credentials to those removed from output. Values shorter than minimumLength are not credentials and are ignored.
func Remove ¶
Remove replaces every remembered credential in text, and the start of one cut short, with "[credential removed]". Where credentials share a start, such as two JWTs from one issuer, the longest match is removed.
func RemoveFromMessage ¶
RemoveFromMessage removes every remembered credential from each string in message, however deeply nested.
Types ¶
type RemovingWriter ¶
RemovingWriter writes to Output with every remembered credential removed. Each write must hold whole lines, as the standard logger's do, so that no credential is split across two writes.