pub struct ClientCredentialsMiddleware { /* private fields */ }Available on non-WebAssembly only.
Expand description
Client credentials authentication middleware.
Implementations§
Source§impl ClientCredentialsMiddleware
impl ClientCredentialsMiddleware
Sourcepub fn new(provider: Arc<dyn OAuthProvider>) -> Self
pub fn new(provider: Arc<dyn OAuthProvider>) -> Self
Create a new client credentials middleware.
Trait Implementations§
Source§impl AuthMiddleware for ClientCredentialsMiddleware
impl AuthMiddleware for ClientCredentialsMiddleware
Source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
auth_info: Option<&'life1 AuthInfo>,
) -> Pin<Box<dyn Future<Output = Result<AuthContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
auth_info: Option<&'life1 AuthInfo>,
) -> Pin<Box<dyn Future<Output = Result<AuthContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Authenticate a request.
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
Check if authentication is required.
Auto Trait Implementations§
impl !RefUnwindSafe for ClientCredentialsMiddleware
impl !UnwindSafe for ClientCredentialsMiddleware
impl Freeze for ClientCredentialsMiddleware
impl Send for ClientCredentialsMiddleware
impl Sync for ClientCredentialsMiddleware
impl Unpin for ClientCredentialsMiddleware
impl UnsafeUnpin for ClientCredentialsMiddleware
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