chore(foundation): use multifunctional authenticate

This commit is contained in:
Sarah Vaupel 2024-01-28 12:45:44 +01:00
parent 471982d245
commit 7e3e772055

View File

@ -139,9 +139,7 @@ instance YesodAuth UniWorX where
setTitleI MsgLoginTitle
$(widgetFile "login")
authenticate c@Creds{..}
| credsPlugin `elem` ["azureadv2", "uniworx_dev"] = UniWorX.oAuthenticate c
| otherwise = UniWorX.authenticate c
authenticate = UniWorX.authenticate
authPlugins UniWorX{ appSettings' = AppSettings{..}, appLdapPool, appAuthPlugins } = appAuthPlugins ++ catMaybes
[ flip campusLogin campusUserFailoverMode <$> appLdapPool