config.rs 354 B

1234567891011121314151617181920212223
  1. #![allow(dead_code)]
  2. use serde::Deserialize;
  3. #[derive(Deserialize)]
  4. pub enum Flow {
  5. Challenge(crate::schema::AuthChallengeType),
  6. OneOf(Vec<Flow>),
  7. AllOf(Vec<Flow>)
  8. }
  9. #[derive(Deserialize)]
  10. pub struct AuthConfig {
  11. pbkdf2_rounds: usize,
  12. login_flow: Flow,
  13. }
  14. #[derive(Deserialize)]
  15. pub struct GlobalConfig {
  16. auth: AuthConfig,
  17. }