Table of Contents

Single-Sign-On into Joomla using Admidio as an OpenID Provider

Starting with version 5.0, Admidio can be used by other applications to authenticate users against Admidio's user base. These instructions will guide you through the process of connecting Joomla to Admidio to use Admidio's login. For general instructions, and other apps, please visit the general Single-Sign-On overview page.

Prerequisites

Throughout the document we will assume you have both Admidio and Joomla already set up properly at https://admidio.local/ and https://joomla.local/. Please modify these URLs to your actual installation.

As a first step, one needs to configure Admidio to act as an OpenID Provider (OP). This has to be done once and is not specific to Joomla. Please follow this guide: #a_basic_setup_for_admidio_as_an_oidc_id_provider

Basically, one (1) needs to create a cryptographic key to sign message and choose a unique EntityID. The page https://admidio.local/adm_program/modules/preferences.php?panel=sso also provides the link to the metadata xml, and the individual settings in case a client does not support auto-configuration via metadata.

TL;DR; - Quick Overview

Setting up a client (OpenID “Relying Party” - short RP) to use Admidio's user accounts for logging in consists of two steps: (1) The client (RP, Joomla in our case) needs to be set up with the data about the OpenID Provider (OP). Typically this is done via the metadata provided in the discovery URL of the provider. Otherwise one has to manually paste the endpoint URLs of the OpenID provider. Since Admidio provides those URLs with copy buttons in the preferences screen, even the manual configuration is rather straigtforward. (2) Admidio needs to be told about the client. In particular, the entity ID and the redirect URL must be given, and a custom-generated (random) secret must be copied to the client configuration.

The concrete steps are:

Joomla-specific instructions

Configuring the Service Provider (Joomla)

OpenID Connect login in Joomla is provided by the miniOrange OAuth Client extension. Simply install it in Joomla's extension manager from the Joomla Extension Directory.

This plugin is available as a (very stripped-down) free version and an (expensive) paid version that supports all OpenID Connect features. The free version only allows login to Joomla through Admidio. Features missing from the free version are: (1) automati creation of new users, (2) automatic plugin configuration from the discovery URL, (3) group mapping for permissions in Joomla, (4) attribute/field mapping for profile data, (5) single-log out from all other apps connected through OpenID with Admidio, (6) login to the administration backend with OpenID.

With the free version, one has to manually create each user and assign the proper permissions and groups in Joomla (using a local Joomla admin account!). This can be very burdensome, so maybe using SAML 2.0 in Joomla with Admidio is a better choice…

Configure the plugin in Joomla's Administration area in the menu section “Components” → “miniOrange OAuth Client” → “Configure OAuth”.

Setting up the Client (SP) in Admidio

It is now a good idea to keep two browser windows open so one can easily select and copy the settings. Admidio even provides little “copy” buttons/icons to copy the various settings to the clipboard for easy pasting into Joomla's configuration.

Return to Admidio's SSO preferences page, go to the “Single-Sign-On Client Administration” (the button right below the endpoint URLs and above the “Save” button), and create a new client.

After saving the settings both in Admidio and Joomla, the Joomla plugin is ready for a test run and the final touches of the configuration:

After saving, the configuration of the OpenID plugin is finished.

Headline

Although the plugin configuration is finished, the plugin does not automatically replace Joomla's login form with the OpenID login link, which is shown in Step 4. Rather, one has to create a custom Joomla module or menu item that uses the provided login link as target.

You should now have login links on your page.

Setup completed, test Single-Sign-On

Admidio and Joomla should now be set up to use Admidio for logging in to Joomla. The normal Joomla login form will still be shown and does NOT redirect to Admidio for login. Rather, it can be used for login with local Joomla accounts, which still can exist in addition to OpenID (or SAML) SSO.

If you log out of Joomla and try to log in again, you will be shown the Admidio login screen and then redirected back to Joomla.

The free version of the “miniOrange OAuth Client” extension does NOT automatically create Joomla user accounts when a new user logs in via OpenID. Instead, one first has to manually create the user in Joomla, before they can log in!!!

Caveats and Things to Consider