pub struct Authentication<P> { /* private fields */ }Expand description
Successful authentication through one named strategy.
Implementations§
Source§impl<P> Authentication<P>
impl<P> Authentication<P>
Sourcepub fn new(strategy: impl Into<String>, principal: P) -> SoapResult<Self>
pub fn new(strategy: impl Into<String>, principal: P) -> SoapResult<Self>
Wraps an authenticated principal and validated strategy identity.
Sourcepub const fn strategy(&self) -> &AuthorizationName
pub const fn strategy(&self) -> &AuthorizationName
Returns the strategy that authenticated the principal.
Sourcepub fn into_principal(self) -> P
pub fn into_principal(self) -> P
Consumes the authentication into its principal.
Trait Implementations§
Source§impl<P: Clone> Clone for Authentication<P>
impl<P: Clone> Clone for Authentication<P>
Source§fn clone(&self) -> Authentication<P>
fn clone(&self) -> Authentication<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug> Debug for Authentication<P>
impl<P: Debug> Debug for Authentication<P>
impl<P: Eq> Eq for Authentication<P>
Source§impl<P: PartialEq> PartialEq for Authentication<P>
impl<P: PartialEq> PartialEq for Authentication<P>
impl<P: PartialEq> StructuralPartialEq for Authentication<P>
Auto Trait Implementations§
impl<P> Freeze for Authentication<P>where
P: Freeze,
impl<P> RefUnwindSafe for Authentication<P>where
P: RefUnwindSafe,
impl<P> Send for Authentication<P>where
P: Send,
impl<P> Sync for Authentication<P>where
P: Sync,
impl<P> Unpin for Authentication<P>where
P: Unpin,
impl<P> UnsafeUnpin for Authentication<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Authentication<P>where
P: UnwindSafe,
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