pub struct HeaderAuthRules {
pub required_headers: Vec<RequiredHeader>,
pub auth_required: Option<String>,
pub api_key_required: bool,
pub authorization_header_required: Option<String>,
pub api_key_header: Option<String>,
}Expand description
The route-level header and authentication rules.
The reference RouteConfig fields required_headers, auth_required,
api_key_required, authorization_header_required, and
api_key_header. The default has no rules: the gate passes.
Fields§
§required_headers: Vec<RequiredHeader>required_headers: checked in order, before authentication.
auth_required: Option<String>auth_required: the authentication scheme
("bearer", "basic", or any other scheme name).
api_key_required: boolapi_key_required: demand a non-empty api_key_header value.
authorization_header_required: a presence-only scheme check that
short-circuits the other two authentication paths.
api_key_header: Option<String>api_key_header: the header the API key is read from.
Implementations§
Trait Implementations§
Source§impl Clone for HeaderAuthRules
impl Clone for HeaderAuthRules
Source§impl Debug for HeaderAuthRules
impl Debug for HeaderAuthRules
Source§impl Default for HeaderAuthRules
impl Default for HeaderAuthRules
impl Eq for HeaderAuthRules
Source§impl PartialEq for HeaderAuthRules
impl PartialEq for HeaderAuthRules
impl StructuralPartialEq for HeaderAuthRules
Auto Trait Implementations§
impl Freeze for HeaderAuthRules
impl RefUnwindSafe for HeaderAuthRules
impl Send for HeaderAuthRules
impl Sync for HeaderAuthRules
impl Unpin for HeaderAuthRules
impl UnsafeUnpin for HeaderAuthRules
impl UnwindSafe for HeaderAuthRules
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.