kanidm/kanidmd/lib/src/idm/mod.rs
James Hodgkinson b8dcb47f93
Spell checking and stuff ()
* codespell run and spelling fixes
* some clippying
* minor fmt fix
* making yamllint happy
* adding codespell github action
2023-01-10 13:50:53 +10:00

42 lines
1.3 KiB
Rust

//! The Identity Management components that are layered on top of the [QueryServer](crate::server::QueryServer). These allow
//! rich and expressive events and transformations that are lowered into the correct/relevant
//! actions in the [QueryServer](crate::server::QueryServer). Generally this is where "Identity Management" policy and code
//! is implemented.
pub mod account;
pub mod applinks;
pub mod authsession;
pub mod credupdatesession;
pub mod delayed;
pub mod event;
pub mod group;
pub mod ldap;
pub mod oauth2;
pub mod radius;
pub mod scim;
pub mod server;
pub mod serviceaccount;
pub mod unix;
use std::fmt;
use kanidm_proto::v1::{AuthAllowed, AuthIssueSession, AuthMech};
pub enum AuthState {
Choose(Vec<AuthMech>),
Continue(Vec<AuthAllowed>),
Denied(String),
Success(String, AuthIssueSession),
}
impl fmt::Debug for AuthState {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
AuthState::Choose(mechs) => write!(f, "AuthState::Choose({:?})", mechs),
AuthState::Continue(allow) => write!(f, "AuthState::Continue({:?})", allow),
AuthState::Denied(reason) => write!(f, "AuthState::Denied({:?})", reason),
AuthState::Success(_token, issue) => write!(f, "AuthState::Success({:?})", issue),
}
}
}