Skip to main content

SecurityProvider

Trait SecurityProvider 

Source
pub trait SecurityProvider: Send + Sync {
    // Provided methods
    fn taint_input(&self, _text: &str) { ... }
    fn sanitize_output(&self, text: &str) -> String { ... }
    fn wipe(&self) { ... }
    fn register_hooks(&self, _hook_engine: &HookEngine) { ... }
    fn teardown(&self, _hook_engine: &HookEngine) { ... }
}
Expand description

Trait for pluggable security providers.

Implement this trait to provide custom security logic for sessions. The default NoOpSecurityProvider passes everything through unchanged.

Provided Methods§

Source

fn taint_input(&self, _text: &str)

Classify and register sensitive data found in input text

Source

fn sanitize_output(&self, text: &str) -> String

Sanitize output text by redacting sensitive data. Returns the sanitized text.

Source

fn wipe(&self)

Securely wipe all session security state

Source

fn register_hooks(&self, _hook_engine: &HookEngine)

Register security hooks with the given engine

Source

fn teardown(&self, _hook_engine: &HookEngine)

Unregister all hooks from the engine

Implementors§