pub struct AuthLayer<V: TokenValidator> { /* private fields */ }Expand description
Tower Layer that wraps services with token authentication.
Implementations§
Source§impl<V: TokenValidator> AuthLayer<V>
impl<V: TokenValidator> AuthLayer<V>
Sourcepub fn new(validator: Arc<V>, config: AuthConfig) -> Self
pub fn new(validator: Arc<V>, config: AuthConfig) -> Self
Create a new auth layer with the given validator and config.
Trait Implementations§
Source§impl<V: TokenValidator> Clone for AuthLayer<V>
impl<V: TokenValidator> Clone for AuthLayer<V>
Auto Trait Implementations§
impl<V> Freeze for AuthLayer<V>
impl<V> RefUnwindSafe for AuthLayer<V>where
V: RefUnwindSafe,
impl<V> Send for AuthLayer<V>
impl<V> Sync for AuthLayer<V>
impl<V> Unpin for AuthLayer<V>
impl<V> UnsafeUnpin for AuthLayer<V>
impl<V> UnwindSafe for AuthLayer<V>where
V: RefUnwindSafe,
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