1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use super::{
Challenge, ChallengeResponse, Error, Info, Verification, VerificationKind, VerificationResponse,
};
use async_trait::async_trait;
use std::io;
#[async_trait]
pub trait AuthMethodHandler: Send {
async fn on_challenge(&mut self, challenge: Challenge) -> io::Result<ChallengeResponse>;
async fn on_verification(
&mut self,
verification: Verification,
) -> io::Result<VerificationResponse>;
async fn on_info(&mut self, info: Info) -> io::Result<()>;
async fn on_error(&mut self, error: Error) -> io::Result<()>;
}
mod prompt;
pub use prompt::*;
mod static_key;
pub use static_key::*;