From 735612ccfba150978d174fcc7d95b2ea3013ab9e Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Mon, 9 Feb 2026 20:59:33 +0800 Subject: refactor: Remove pam authentication method Signed-off-by: KunoiSayami --- src/authentication.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/authentication.rs') diff --git a/src/authentication.rs b/src/authentication.rs index 4d343c0..151d7e0 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -1,5 +1,4 @@ -#[cfg(feature = "pam")] -use crate::datastructures::AuthorizerType; + use crate::datastructures::{Config, Cookie, FormData, WrapConfigure}; use anyhow::Result; use clap::ArgMatches; @@ -215,19 +214,11 @@ pub(crate) async fn cmd_init(cfg: Config) -> Result<()> { Ok(()) } -#[cfg(not(feature = "pam"))] pub(crate) async fn verify_login(cfg: &WrapConfigure, data: &FormData) -> Result { cfg.hook().await?; data.authorize(cfg.get_authorizer()).await } -#[cfg(feature = "pam")] -pub(crate) async fn verify_login(cfg: &WrapConfigure, data: &FormData) -> Result { - if let AuthorizerType::Password = cfg.get_authorizer().method() { - cfg.hook().await?; - } - data.authorize(cfg.get_authorizer()).await -} #[derive(Serialize)] pub struct Meta<'a> { -- cgit v1.3.1