pub struct AuthContext {
pub service_id: u64,
pub auth_method: AuthMethod,
pub client_cert: Option<ClientCertInfo>,
pub additional_headers: HashMap<String, String>,
}Expand description
Request extension for authentication context
Fields§
§service_id: u64§auth_method: AuthMethod§client_cert: Option<ClientCertInfo>§additional_headers: HashMap<String, String>Implementations§
Source§impl AuthContext
impl AuthContext
pub fn new(service_id: u64, auth_method: AuthMethod) -> Self
pub fn with_client_cert(self, client_cert: Option<ClientCertInfo>) -> Self
pub fn with_headers(self, headers: HashMap<String, String>) -> Self
pub fn is_mtls(&self) -> bool
pub fn client_cert_subject(&self) -> Option<&str>
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 moreAuto 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