====== AuthJoomla Plugin ====== ---- plugin ---- description: author : Andreas Gohr email : dokuwiki@cosmocode.de type : auth lastupdate : 2018-05-07 compatible : Greebo depends : conflicts : similar : tags : joomla downloadurl: https://github.com/cosmocode/dokuwiki-plugin-authjoomla/zipball/master bugtracker : https://github.com/cosmocode/dokuwiki-plugin-authjoomla/issues sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-authjoomla donationurl: screenshot_img : ---- This plugin allows authentication against a [[https://www.joomla.org/|Joomla CMS]] user database with optional Single-Sign-On (SSO). [[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]] ===== Installation ===== :!: **Requirements:** * a recent version of Joomla (tested with Joomla 3.8.7) * for Single-Sign-On: * sessions stored in the database ((Joomla Admin -> System -> Global Configuration -> Session Settings -> Session Handler: Database)) * Joomla and DokuWiki running on the same domain Search and install the plugin using the [[plugin:extension|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: - log into your Joomla in Chrome - press F12 to open the developer Tools - switch to the Application tab - select Storage -> Cookies -> your URL from the sidebar - You should see a Cookie with a 32 character hex name and another hex string as value - 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 ===== * [[:acl|Access Control Lists (ACL)s]] * [[config:superuser|Configuration Setting: superuser]] * [[config:defaultgroup|Configuration Setting: defaultgroup]]