-- SPDX-FileCopyrightText: 2024 UniWorX Systems -- SPDX-FileContributor: David Mosbach -- -- SPDX-License-Identifier: AGPL-3.0-or-later {-# Language DataKinds, TypeOperators, OverloadedStrings #-} module SSO (SSOTest, routes) where import Prelude hiding (head) import UniWorX import Server import Data.String (IsString(..)) import Data.Text (Text) import Database.Persist (Entity(..)) import Servant.API import Text.Blaze.Html5 import qualified Text.Blaze.Html5.Attributes as A type SSOTest = "test-sso" :> Get '[HTML] Html routes :: AuthServer (Entity User) SSOTest routes = return ssoLink where ssoLink :: Html ssoLink = docTypeHtml $ head' >> body' where t = "OIDC SSO Test" head' = head $ do meta ! A.charset "UTF-8" meta ! A.name "viewport" ! A.content "width=device-width, initial-scale=1.0" title t body' = body $ do h1 t a ! A.href "https:..." $ "Go to FraDrive"