1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pub mod account;
pub mod grant;
pub mod token;
pub mod account_summary;
pub mod template;
pub mod download_cli;
pub mod healthcheck;
pub mod worker;
pub mod limits;
pub mod login;
pub mod project;
pub mod project_grant;
pub mod project_policy;
pub mod whitelist;
pub mod model;

pub fn hide_authorization<'t>(k: &'t http::HeaderName, v: &http::HeaderValue) -> (&'t str, String) {
    let k_str = k.as_str();

    let v_str =
        if k_str.to_lowercase() == "authorization" { "******".to_string() }
        else { format!("{:?}", v) };

    (k_str, v_str)
}