pub struct AuthContext { /* private fields */ }Expand description
Lightweight auth context derived from canonical headers set by the proxy
Implementations§
Source§impl AuthContext
impl AuthContext
Sourcepub fn from_headers<H>(headers: &H) -> Self
pub fn from_headers<H>(headers: &H) -> Self
Create AuthContext from a generic header map to avoid axum dependency
Sourcepub fn from_axum_headers(headers: &HeaderMap) -> Self
pub fn from_axum_headers(headers: &HeaderMap) -> Self
Create AuthContext from axum HeaderMap for backward compatibility
pub fn tenant_hash(&self) -> Option<&str>
pub fn scopes(&self) -> Vec<String>
pub fn has_scope(&self, scope: &str) -> bool
pub fn has_any_scope<'a>( &self, names_or_prefixes: impl IntoIterator<Item = &'a str>, ) -> bool
Trait Implementations§
Source§impl Clone for AuthContext
impl Clone for AuthContext
Source§fn clone(&self) -> AuthContext
fn clone(&self) -> AuthContext
Returns a duplicate of the value. Read more
1.0.0 · 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 AuthContext
impl Debug for AuthContext
Source§impl Default for AuthContext
impl Default for AuthContext
Source§fn default() -> AuthContext
fn default() -> AuthContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AuthContext
impl RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl UnwindSafe for AuthContext
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