pub struct BearerAuth { /* private fields */ }Expand description
Applies an OAuth2 access token as an Authorization: Bearer header.
Implementations§
Source§impl BearerAuth
impl BearerAuth
Sourcepub const fn from_token(token: BearerToken) -> Self
pub const fn from_token(token: BearerToken) -> Self
Builds a provider from an already-wrapped token.
Sourcepub const fn token(&self) -> &BearerToken
pub const fn token(&self) -> &BearerToken
The token this provider applies.
Sourcepub fn header_value(&self) -> String
pub fn header_value(&self) -> String
The header value sent to the server.
Trait Implementations§
Source§impl AuthProvider for BearerAuth
impl AuthProvider for BearerAuth
Source§fn authenticate(&self, headers: &mut Headers)
fn authenticate(&self, headers: &mut Headers)
Applies this provider’s credentials to
headers. Read moreSource§impl Clone for BearerAuth
impl Clone for BearerAuth
Auto Trait Implementations§
impl Freeze for BearerAuth
impl RefUnwindSafe for BearerAuth
impl Send for BearerAuth
impl Sync for BearerAuth
impl Unpin for BearerAuth
impl UnsafeUnpin for BearerAuth
impl UnwindSafe for BearerAuth
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