mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-22 08:53:57 +02:00
* codespell run and spelling fixes * some clippying * minor fmt fix * making yamllint happy * adding codespell github action
42 lines
1.3 KiB
Rust
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),
|
|
}
|
|
}
|
|
}
|