aboutsummaryrefslogtreecommitdiff
path: root/src/authentication.rs
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2026-02-09 20:59:33 +0800
committerKunoiSayami <[email protected]>2026-02-09 20:59:33 +0800
commit735612ccfba150978d174fcc7d95b2ea3013ab9e (patch)
tree24eff0b3bdbb4cd70246b90cf3eeec86acb62762 /src/authentication.rs
parent2d3d384f2c32562df304d027c30e6986bd94c157 (diff)
refactor: Remove pam authentication method
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/authentication.rs')
-rw-r--r--src/authentication.rs11
1 files changed, 1 insertions, 10 deletions
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<bool> {
cfg.hook().await?;
data.authorize(cfg.get_authorizer()).await
}
-#[cfg(feature = "pam")]
-pub(crate) async fn verify_login(cfg: &WrapConfigure, data: &FormData) -> Result<bool> {
- if let AuthorizerType::Password = cfg.get_authorizer().method() {
- cfg.hook().await?;
- }
- data.authorize(cfg.get_authorizer()).await
-}
#[derive(Serialize)]
pub struct Meta<'a> {