chore: add TODOs and debug logs

This commit is contained in:
Sarah Vaupel 2024-03-03 04:35:39 +01:00
parent 434eed2217
commit 4ff51c8f6f
2 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,7 @@ User json -- Each Uni2work user has a corresponding row in this table; create
-- | User data fetched from external user sources, used for authentication and data queries
ExternalUser
user UserId
user UserId -- TODO: use UserIdent or Text instead; not every external user may have ever logged in (or needs to), i.e. users that have been queried in admin handler!
source AuthSourceIdent -- Identifier of the external source in the config
data Value "default='{}'::jsonb" -- Raw user data from external source -- TODO: maybe make Maybe, iff the source only ever responds with "success"?
lastSync UTCTime -- When was the external source last queried?

View File

@ -56,6 +56,7 @@ authenticate creds@Creds{..} = liftHandler . runDB . withReaderT projectBackend
now <- liftIO getCurrentTime
userAuthConf <- getsYesod $ view _appUserAuthConf
$logErrorS "authenticate AuthConf Debug" $ "\27[31m" <> tshow userAuthConf <> "\27[0m" -- TODO: debug only
let
uAuth = UniqueAuthentication $ CI.mk credsIdent