pub struct AuthenticationMiddleware { /* private fields */ }
Expand description
Authentication middleware
Implementations§
Source§impl AuthenticationMiddleware
impl AuthenticationMiddleware
Sourcepub fn new<P>(provider: P) -> Selfwhere
P: AuthProvider + 'static,
pub fn new<P>(provider: P) -> Selfwhere
P: AuthProvider + 'static,
Create new authentication middleware
Sourcepub fn with_config<P>(provider: P, config: AuthConfig) -> Selfwhere
P: AuthProvider + 'static,
pub fn with_config<P>(provider: P, config: AuthConfig) -> Selfwhere
P: AuthProvider + 'static,
Create with configuration
Trait Implementations§
Source§impl Debug for AuthenticationMiddleware
impl Debug for AuthenticationMiddleware
Source§impl Middleware for AuthenticationMiddleware
impl Middleware for AuthenticationMiddleware
Source§fn process_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut JsonRpcRequest,
_ctx: &'life2 mut RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut JsonRpcRequest,
_ctx: &'life2 mut RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process request before routing
Source§fn process_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_response: &'life1 mut JsonRpcResponse,
_ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_response: &'life1 mut JsonRpcResponse,
_ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process response after routing
Auto Trait Implementations§
impl Freeze for AuthenticationMiddleware
impl !RefUnwindSafe for AuthenticationMiddleware
impl Send for AuthenticationMiddleware
impl Sync for AuthenticationMiddleware
impl Unpin for AuthenticationMiddleware
impl !UnwindSafe for AuthenticationMiddleware
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