Skip to main content

redact_auth

Function redact_auth 

Source
pub fn redact_auth(auth: &str) -> String
Expand description

Build a redacted form of an auth string suitable for logging.

Replaces the password with **** while preserving the username. If the string contains no :, the entire content is replaced with ****.