pub enum Denied {
Missing,
Malformed(&'static str),
Rejected {
username: String,
},
}Expand description
Why a request’s credentials were not accepted.
No variant carries anything derived from the password: this type exists to be logged.
Variants§
Missing
Neither Proxy-Authorization nor Authorization was present.
Malformed(&'static str)
A credentials field was present but unusable.
Rejected
Well-formed credentials that match no configured user.
Fields
§
username: StringThe user-id the client claimed. Not a secret, and the only way to tell a typo apart from a scan in the logs.
Bounded by crate::logfmt::bounded_bytes where it is built rather
than where it is logged: the peer chooses its length as well as its
bytes, and a user-id is everything before the first colon of a whole
field section, so an unbounded one costs a 49 KB allocation on the
way to a log line five times that size (review H3).
Implementations§
Trait Implementations§
impl Eq for Denied
impl StructuralPartialEq for Denied
Auto Trait Implementations§
impl Freeze for Denied
impl RefUnwindSafe for Denied
impl Send for Denied
impl Sync for Denied
impl Unpin for Denied
impl UnsafeUnpin for Denied
impl UnwindSafe for Denied
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