pub struct MetricsBasicAuthConfig {
pub username: String,
pub password_hash: String,
}Expand description
Optional HTTP Basic authentication for the metrics scrape endpoint.
The password is stored as a bcrypt hash (RFC 7617 + bcrypt §3) so the
plaintext password never lives at rest. Use bcrypt::hash(password, bcrypt::DEFAULT_COST) to generate or htpasswd -B -n username from a
shell.
Fields§
§username: StringRequired username.
password_hash: Stringbcrypt-hashed password.
Trait Implementations§
Source§impl Clone for MetricsBasicAuthConfig
impl Clone for MetricsBasicAuthConfig
Source§fn clone(&self) -> MetricsBasicAuthConfig
fn clone(&self) -> MetricsBasicAuthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricsBasicAuthConfig
impl Debug for MetricsBasicAuthConfig
Source§impl<'de> Deserialize<'de> for MetricsBasicAuthConfig
impl<'de> Deserialize<'de> for MetricsBasicAuthConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetricsBasicAuthConfig
impl RefUnwindSafe for MetricsBasicAuthConfig
impl Send for MetricsBasicAuthConfig
impl Sync for MetricsBasicAuthConfig
impl Unpin for MetricsBasicAuthConfig
impl UnsafeUnpin for MetricsBasicAuthConfig
impl UnwindSafe for MetricsBasicAuthConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more