DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:authjoomla

authjoomla Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown

plugin

Last updated on
2018-05-07
Provides
Auth
Repository
Source

Tagged with joomla

This plugin allows authentication against a Joomla CMS user database with optional Single-Sign-On (SSO).

Installation

A CosmoCode Plugin

:!: Requirements:

  • a recent version of Joomla (tested with Joomla 3.8.7)
  • for Single-Sign-On:
    • sessions stored in the database 1)
    • Joomla and DokuWiki running on the same domain

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Configuration

The plugin has a few config options:

  • debug – when enabled some more detailed error messages are displayed, helpful during setup
  • dsn – the connection string to access the Joomla data base. eg. mysql:host=localhost;dbname=joomla;charset=utf8
  • user – the user to access the Joomla database
  • pass – the password to access the Joomla database
  • tableprefix – the table prefix used for installing Joomla, should include the trailing underscore _
  • cookiename – optional cookie name to enable SSO, see below

Single Sign-On

When used without setting the cookiename option, this plugin simply preconfigures the authpdo plugin. You can login with your Joomla user/password credentials.

Once the cookie name is set, DokuWiki will check if this cookie exists, reads the Joomla session identifier from it and checks if a valid session exists in Joomla's session table. If so, the user is logged into DokuWiki automatically without the need to log in manually.

Please note: users logging into DokuWiki will not be logged into Joomla automatically.

The cookie name used by Joomla is a semi-random string. Easiest way to find it is using Chrome's Developer Tools:

  1. log into your Joomla in Chrome
  2. press F12 to open the developer Tools
  3. switch to the Application tab
  4. select Storage → Cookies → your URL from the sidebar
  5. You should see a Cookie with a 32 character hex name and another hex string as value
  6. The name is what you are looking for copy it into your DokuWiki configuration

Users and Groups

Users and Groups are named as they are in Joomla. No normalizing to DokuWiki page IDs is done. You will probably want to adjust your ACLs and super user settings.

Groups in Joomla are hierarchical. This is reflected in this Plugin. When a user is in one Joomla group, the user will also be in the upper groups in DokuWiki. A / is used as hierarchy separator.

Eg. the super user is by default in the following groups:

  • Public
  • Public/Super Users

In addition all users are automatically added to the configured default group.

See also

1)
Joomla Admin → System → Global Configuration → Session Settings → Session Handler: Database
plugin/authjoomla.txt · Last modified: 2018-05-28 19:41 by Klap-in