pub struct ProxyAuthorization { /* private fields */ }Expand description
Per-instance capability credentials for the loopback proxy.
There is deliberately no public constructor that accepts credentials. A running proxy must
generate a fresh value and require it on every request, including CONNECT requests.
Implementations§
Source§impl ProxyAuthorization
impl ProxyAuthorization
pub fn generate() -> Result<Self, AuthorizationGenerationError>
pub fn realm(&self) -> &str
pub fn username(&self) -> &str
pub fn password(&self) -> &str
pub fn challenge_header_value(&self) -> String
Sourcepub fn verify_header_values<'a>(
&self,
values: impl IntoIterator<Item = &'a str>,
) -> bool
pub fn verify_header_values<'a>( &self, values: impl IntoIterator<Item = &'a str>, ) -> bool
Verifies exactly one Proxy-Authorization value.
Callers should pass every occurrence of the header so duplicate credentials fail closed.
pub fn verify_header_value(&self, value: &str) -> bool
Sourcepub fn matches_challenge(&self, host: &str, challenge_realm: &str) -> bool
pub fn matches_challenge(&self, host: &str, challenge_realm: &str) -> bool
Limits credential challenge handling to this proxy’s only supported bind address.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyAuthorization
impl RefUnwindSafe for ProxyAuthorization
impl Send for ProxyAuthorization
impl Sync for ProxyAuthorization
impl Unpin for ProxyAuthorization
impl UnsafeUnpin for ProxyAuthorization
impl UnwindSafe for ProxyAuthorization
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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