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§
Sourcefn taint_input(&self, _text: &str)
fn taint_input(&self, _text: &str)
Classify and register sensitive data found in input text
Sourcefn sanitize_output(&self, text: &str) -> String
fn sanitize_output(&self, text: &str) -> String
Sanitize output text by redacting sensitive data. Returns the sanitized text.
Sourcefn register_hooks(&self, _hook_engine: &HookEngine)
fn register_hooks(&self, _hook_engine: &HookEngine)
Register security hooks with the given engine
Sourcefn teardown(&self, _hook_engine: &HookEngine)
fn teardown(&self, _hook_engine: &HookEngine)
Unregister all hooks from the engine