pub trait WebSocketAuthPlugin:
Send
+ Sync
+ Any {
// Required methods
fn authorize<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ConnectionAuthRequest,
) -> Pin<Box<dyn Future<Output = AuthDecision> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn as_any(&self) -> &dyn Any;
// Provided methods
fn audit_logger(&self) -> Option<&dyn SecurityAuditLogger> { ... }
fn log_audit<'life0, 'async_trait>(
&'life0 self,
event: SecurityAuditEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn auth_metrics(&self) -> Option<&AuthMetrics> { ... }
}Required Methods§
Provided Methods§
Sourcefn audit_logger(&self) -> Option<&dyn SecurityAuditLogger>
fn audit_logger(&self) -> Option<&dyn SecurityAuditLogger>
Get the audit logger if configured
Sourcefn log_audit<'life0, 'async_trait>(
&'life0 self,
event: SecurityAuditEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log_audit<'life0, 'async_trait>(
&'life0 self,
event: SecurityAuditEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Log a security audit event if audit logging is enabled
Sourcefn auth_metrics(&self) -> Option<&AuthMetrics>
fn auth_metrics(&self) -> Option<&AuthMetrics>
Get auth metrics if configured