ChallengeRegistry

Trait ChallengeRegistry 

Source
pub trait ChallengeRegistry: Send + Sync {
    // Required methods
    fn register(&self, id: &str);
    fn check(&self, id: &str) -> RegistryCheckResult;
    fn verify(&self, id: &str);
    fn note_attempt(&self, id: &str, success: bool);
}
Expand description

This file defines trait for the challenge registry implementation that stores generated challenges in memory or database, checks how many resolving attempts performed to prevent brute-force.

Required Methods§

Source

fn register(&self, id: &str)

Source

fn check(&self, id: &str) -> RegistryCheckResult

Source

fn verify(&self, id: &str)

Source

fn note_attempt(&self, id: &str, success: bool)

Implementors§