pub struct BearerAuth<P: TokenProvider> { /* private fields */ }Expand description
Sends the token as Authorization: Bearer, which is how HEY takes one.
Implementations§
Source§impl<P: TokenProvider> BearerAuth<P>
impl<P: TokenProvider> BearerAuth<P>
Sourcepub fn new(provider: P) -> BearerAuth<P>
pub fn new(provider: P) -> BearerAuth<P>
Bearer authentication over the given provider’s tokens.
Trait Implementations§
Source§impl<P: TokenProvider> AuthStrategy for BearerAuth<P>
impl<P: TokenProvider> AuthStrategy for BearerAuth<P>
Source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Puts the credentials on a request about to be sent.
Auto Trait Implementations§
impl<P> Freeze for BearerAuth<P>where
P: Freeze,
impl<P> RefUnwindSafe for BearerAuth<P>where
P: RefUnwindSafe,
impl<P> Send for BearerAuth<P>
impl<P> Sync for BearerAuth<P>
impl<P> Unpin for BearerAuth<P>where
P: Unpin,
impl<P> UnsafeUnpin for BearerAuth<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for BearerAuth<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