Resolve "Benutzerdaten-Abfrage: Mehrere Modi & OAuth-Modus" #207

Merged
savau merged 144 commits from 142-userdata-oauth-mode into oauth2 2024-03-13 17:24:06 +01:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 77a9100b2e - Show all commits

View File

@ -75,7 +75,7 @@ type UserEduPersonPrincipalName = Text
-- | Used for uniquely storing ExternalUser entries per user and source
data AuthSourceIdent
= AuthSourceIdAzure
{ authSourceIdAzureClientId :: UUID
{ authSourceIdAzureClientId :: UUID -- FIXME: use tenant id instead
}
| AuthSourceIdLdap
{ authSourceIdLdapHost :: Text -- normally either just the hostname, or hostname and port

View File

@ -155,6 +155,11 @@ data UserAuthConf =
-- | UserAuthConfNoSource -- ^ allow no external sources at all -- TODO: either this, or make user-auth in settings.yml optional
deriving (Show)
mkAuthSourceIdent :: AuthSourceConf -> AuthSourceIdent
mkAuthSourceIdent = \case
AuthSourceConfAzureAdV2 AzureConf{..} -> AuthSourceIdAzure azureConfClientId
AuthSourceConfLdap LdapConf{..} -> AuthSourceIdLdap ldapConfSourceId
data LmsConf = LmsConf
{ lmsUploadHeader :: Bool
, lmsUploadDelimiter :: Maybe Char