pub struct ComprehensiveAuthProvider { /* private fields */ }Expand description
Comprehensive authentication provider with password auth and ACL support
Implementations§
Source§impl ComprehensiveAuthProvider
impl ComprehensiveAuthProvider
pub fn new() -> Self
pub fn with_providers( password_provider: PasswordAuthProvider, acl_manager: AclManager, ) -> Self
Sourcepub async fn from_files(
password_file: impl AsRef<Path>,
acl_file: impl AsRef<Path>,
) -> Result<Self>
pub async fn from_files( password_file: impl AsRef<Path>, acl_file: impl AsRef<Path>, ) -> Result<Self>
Creates a comprehensive auth provider with password file and ACL file
§Errors
Returns an error if files cannot be loaded
Sourcepub async fn with_password_file_and_allow_all_acl(
password_file: impl AsRef<Path>,
) -> Result<Self>
pub async fn with_password_file_and_allow_all_acl( password_file: impl AsRef<Path>, ) -> Result<Self>
Creates a comprehensive auth provider with allow-all ACL
§Errors
Returns an error if the password file cannot be loaded
pub fn password_provider(&self) -> &PasswordAuthProvider
pub fn acl_manager(&self) -> &AclManager
Trait Implementations§
Source§impl AuthProvider for ComprehensiveAuthProvider
impl AuthProvider for ComprehensiveAuthProvider
Source§fn authenticate<'a>(
&'a self,
connect: &'a ConnectPacket,
client_addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<AuthResult>> + Send + 'a>>
fn authenticate<'a>( &'a self, connect: &'a ConnectPacket, client_addr: SocketAddr, ) -> Pin<Box<dyn Future<Output = Result<AuthResult>> + Send + 'a>>
Authenticate a client connection Read more
fn supports_enhanced_auth(&self) -> bool
fn authenticate_enhanced<'a>( &'a self, auth_method: &'a str, _auth_data: Option<&'a [u8]>, _client_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<EnhancedAuthResult>> + Send + 'a>>
fn reauthenticate<'a>( &'a self, auth_method: &'a str, _auth_data: Option<&'a [u8]>, _client_id: &'a str, _user_id: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<EnhancedAuthResult>> + Send + 'a>>
fn cleanup_session<'a>( &'a self, _user_id: &'a str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
Source§impl Debug for ComprehensiveAuthProvider
impl Debug for ComprehensiveAuthProvider
Auto Trait Implementations§
impl !Freeze for ComprehensiveAuthProvider
impl !RefUnwindSafe for ComprehensiveAuthProvider
impl !UnwindSafe for ComprehensiveAuthProvider
impl Send for ComprehensiveAuthProvider
impl Sync for ComprehensiveAuthProvider
impl Unpin for ComprehensiveAuthProvider
impl UnsafeUnpin for ComprehensiveAuthProvider
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