DGTLMS & LMSDISPATCHER Guide

Authentication & SSO

Connect Keycloak (OpenID Connect)

Let your users log in to DGTLMS with their Keycloak account, via OpenID Connect — with automatic import of the configuration.

Administrator~10 minutesIntermediate
  • Keycloak administrator access (to create a client) and DGTLMS administrator access.
  • The URL of your Keycloak realm.

In Keycloak

  1. Create a client

    In your realm, create an OpenID Connect client (confidential type).

  2. Enter the redirect URL

    Add the DGTLMS return URL (shown by DGTLMS during configuration).

  3. Get the credentials

    Note the Client ID and the Client secret.

In DGTLMS

  1. Open the configuration

    Administration → Authentication configuration → Add an authentication mode → OAuth2 / OpenID Connect.

  2. Import the configuration

    Paste your realm's discovery URL — https://<keycloak>/realms/<realm>/.well-known/openid-configuration — then click Import. The endpoints (authorisation, token, userinfo, logout) are filled in automatically.

  3. Enter the client credentials

    Enter the Client ID and Client secret obtained in Keycloak.

  4. Check the attribute mapping

    Make sure the email, last name and first name are mapped to the corresponding Keycloak fields.

  5. Save and test

    Confirm, then test the login from the login page.

Multi-profile users (learner and instructor…)

The same person can have several roles in DGTLMS (learner, instructor, custom level). With Keycloak, this works without any development — it is purely a matter of configuration:

  1. Enable both options

    in Administration → Configuration: "Enable multi-profile users" (profile choice at login) and "Display profile selector" (switching during a session, at the top right). Leave the automatic login as a learner option disabled, otherwise the choice is bypassed.

  2. Align the username sent by Keycloak

    DGTLMS links a person to their various profiles through the username stem (the username without the role suffix _APP/_FOR…). The claim that Keycloak sends as the login must therefore match this stem (often preferred_username), not necessarily the email address. If needed, add a Keycloak mapper that emits exactly this username. This is the only truly specific point to check — especially for your existing accounts ending in _FOR/_APP.

  3. Create the additional roles

    a new, unknown user is automatically created as a learner. To give them a second role (e.g. instructor), an administrator adds the profile from their record: DGTLMS then automatically adds suffixes to the accounts (_APP, _FOR…). The person will then see the choice at login and the selector during the session.

> The link to the Keycloak identity relies on the provider's stable identifier (the sub claim): it withstands email address changes and survives the addition of a role.

  • The discovery URL must use HTTPS.
  • Keycloak can also be connected via SAML, but OIDC is simpler thanks to the automatic import.
  • The account must exist in DGTLMS (or be provisioned) for the login to succeed.

See also