pub struct BearerAuthHandler { /* private fields */ }Expand description
Bearer Token Authentication Handler
Implementations§
Source§impl BearerAuthHandler
impl BearerAuthHandler
Sourcepub fn with_required_token(self, token: &str) -> Self
pub fn with_required_token(self, token: &str) -> Self
Configure required token for server mode
Sourcepub fn with_client_token(self, token: BearerToken) -> Self
pub fn with_client_token(self, token: BearerToken) -> Self
Configure client token for outgoing requests
Trait Implementations§
Source§impl AuthHandler for BearerAuthHandler
impl AuthHandler for BearerAuthHandler
Source§fn validate_request(
&self,
request: &UniversalRequest,
) -> Result<(), ProtocolError>
fn validate_request( &self, request: &UniversalRequest, ) -> Result<(), ProtocolError>
Validate request authentication
Source§fn add_auth_headers(
&self,
request: &mut UniversalRequest,
) -> Result<(), ProtocolError>
fn add_auth_headers( &self, request: &mut UniversalRequest, ) -> Result<(), ProtocolError>
Add authentication to outgoing request
Auto Trait Implementations§
impl Freeze for BearerAuthHandler
impl RefUnwindSafe for BearerAuthHandler
impl Send for BearerAuthHandler
impl Sync for BearerAuthHandler
impl Unpin for BearerAuthHandler
impl UnsafeUnpin for BearerAuthHandler
impl UnwindSafe for BearerAuthHandler
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