Skip to main content

Interrogator

Trait Interrogator 

Source
pub trait Interrogator: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn challenge_level(&self) -> u8;
    fn generate_challenge(&self, actor_id: &str) -> ChallengeResponse;
    fn validate_response(
        &self,
        actor_id: &str,
        response: &str,
    ) -> ValidationResult;
    fn should_escalate(&self, actor_id: &str) -> bool;
}
Expand description

Trait for challenge implementations

Required Methods§

Source

fn name(&self) -> &'static str

Name of this interrogator

Source

fn challenge_level(&self) -> u8

Challenge level (1-5, lower = softer)

Source

fn generate_challenge(&self, actor_id: &str) -> ChallengeResponse

Generate a challenge for the actor

Source

fn validate_response(&self, actor_id: &str, response: &str) -> ValidationResult

Validate a challenge response

Source

fn should_escalate(&self, actor_id: &str) -> bool

Check if actor should escalate to next level

Implementors§