(&self)
| 191 | } |
| 192 | impl AuthHeader { |
| 193 | pub fn to_header(&self) -> Option<http::HeaderValue> { |
| 194 | self.token.as_ref().map(|token| { |
| 195 | let mut val = http::HeaderValue::try_from(["Bearer ", token].concat()).unwrap(); |
| 196 | val.set_sensitive(true); |
| 197 | val |
| 198 | }) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | pub const VALID_PROTOCOLS: [&str; 2] = ["http", "https"]; |
no test coverage detected