feat(auth): link to sso test from dev login widget
This commit is contained in:
parent
1489c27121
commit
956464659e
@ -9,7 +9,8 @@ let
|
|||||||
|
|
||||||
haskellPackages = pkgs.haskellPackages;
|
haskellPackages = pkgs.haskellPackages;
|
||||||
|
|
||||||
oauth2Flake = (builtins.getFlake "git+https://gitlab.uniworx.de/mosbach/oauth2-mock-server/?rev=d47908b4f7883b4b485abf1ee06645495ccdc7b3&ref=user-queries").packages.x86_64-linux;
|
oauth2Flake = (builtins.getFlake "git+https://gitlab.uniworx.de/mosbach/oauth2-mock-server/?rev=45debf40cd171f78a4de38f608a6cfd3be73b91a&ref=oidc").packages.x86_64-linux;
|
||||||
|
|
||||||
|
|
||||||
oauth2MockServer = oauth2Flake.default;
|
oauth2MockServer = oauth2Flake.default;
|
||||||
mkOauth2DB = oauth2Flake.mkOauth2DB;
|
mkOauth2DB = oauth2Flake.mkOauth2DB;
|
||||||
|
|||||||
@ -42,6 +42,8 @@ import Foundation.DB
|
|||||||
|
|
||||||
import Network.Wai.Parse (lbsBackEnd)
|
import Network.Wai.Parse (lbsBackEnd)
|
||||||
|
|
||||||
|
import System.Environment (lookupEnv)
|
||||||
|
|
||||||
import UnliftIO.Pool (withResource)
|
import UnliftIO.Pool (withResource)
|
||||||
|
|
||||||
import qualified Control.Monad.State.Class as State
|
import qualified Control.Monad.State.Class as State
|
||||||
@ -136,6 +138,12 @@ instance YesodAuth UniWorX where
|
|||||||
plugins <- getsYesod authPlugins
|
plugins <- getsYesod authPlugins
|
||||||
$logDebugS "Auth" $ "Enabled plugins: " <> Text.intercalate ", " (map apName plugins)
|
$logDebugS "Auth" $ "Enabled plugins: " <> Text.intercalate ", " (map apName plugins)
|
||||||
|
|
||||||
|
#ifdef DEVELOPMENT
|
||||||
|
mPort <- liftIO $ lookupEnv "OAUTH2_SERVER_PORT"
|
||||||
|
#else
|
||||||
|
let mPort = Nothing
|
||||||
|
#endif
|
||||||
|
|
||||||
setTitleI MsgLoginTitle
|
setTitleI MsgLoginTitle
|
||||||
$(widgetFile "login")
|
$(widgetFile "login")
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
$newline never
|
$newline never
|
||||||
|
|
||||||
$# SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
|
$# SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>, David Mosbach <david.mosbach@uniworx.de>
|
||||||
$#
|
$#
|
||||||
$# SPDX-License-Identifier: AGPL-3.0-or-later
|
$# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -26,3 +26,8 @@ $forall AuthPlugin{apName, apLogin} <- plugins
|
|||||||
<section>
|
<section>
|
||||||
<h2>_{MsgDummyLoginTitle}
|
<h2>_{MsgDummyLoginTitle}
|
||||||
^{apLogin toParent}
|
^{apLogin toParent}
|
||||||
|
$maybe port <- mPort
|
||||||
|
<section>
|
||||||
|
<h2>SSO Dev Test
|
||||||
|
<a href=http://localhost:#{port}/test-sso>Test login via single sign-on
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user