use std::time::Duration;
use crate::AuthenticError;
#[cfg(feature = "loop")]
mod loops;
mod simple;
#[cfg(feature = "step")]
mod step;
#[cfg(feature = "loop")]
pub use loops::*;
pub use simple::*;
#[cfg(feature = "step")]
pub use step::*;
pub trait AuthenticationCredential {
type Fetch;
fn auth_step(&self) -> Result<Duration, AuthenticError> {
Ok(Duration::ZERO)
}
fn fetch(&self) -> Result<Self::Fetch, AuthenticError>;
}
pub trait FetchedToken {
fn token(&self) -> &[u8];
}
pub trait FetchedUsernamePassword {
fn username(&self) -> &str;
fn password(&self) -> &str;
}