pub mod commands;
mod credential;
mod dispatcher;
pub mod exec;
#[cfg(feature = "pkce-auth")]
pub mod pkce;
use async_trait::async_trait;
pub use commands::{
AuthLoginResult, AuthStatusEntry, auth_command_group, login_and_build, logout_result,
status_result, to_status_entry,
};
pub use credential::{CACHE_TTL, Credential};
pub use dispatcher::{Dispatcher, SingleProvider, StatusEntry};
pub use exec::{
ACTION_AUTHENTICATE, ACTION_LIST_ENVIRONMENTS, ACTION_LIST_REALMS, ACTION_LOGOUT,
ACTION_STATUS, AuthnRequest, EnvironmentsResponse, ExecProvider,
};
use crate::Result;
#[async_trait]
pub trait AuthProvider: Send + Sync + std::fmt::Debug {
fn name(&self) -> &str;
async fn get_credential(&self, env: &str, command: &str, tier: &str) -> Result<Credential>;
async fn status(&self, env: &str) -> Result<Credential>;
async fn logout(&self, env: &str) -> Result<()>;
async fn list_environments(&self) -> Result<Vec<String>>;
}