Sorry for the title, I can't find the right words for this. Let me explain what I want to do:
I have a Site, and a Wiki (latest Mediawiki). The Wiki is closed, so you need an account to read/write in the wiki. But when a user logs in into my site, he shall be automatically be logged in into the wiki when he comes there.
My first look into the mysql mediawiki user-table made me clueless: everything is saved as binary data, but in my user database it's plaintext, except the password of course.
I don't know how to proceed?
HTTP uses port 80 by default. One or another must be set up to use a different port, then both can be run but one on port 80 and the other on a different port (like port 81, 8080, etc).
You basically want to have two things:
Mediawiki has several extensions with connect the user management to a different database, for example:
You should have a look at ExtAuthDB, since it should be configurable enough for you.
Single sign on (SSO) is mostly done by sharing a cookie between the web applications. To make this happen, you need to have the wiki in a subdomain of your main page, i.e. wiki.example.org
when your website is at example.org
.
On your website, set a cookie for .example.org
(note the leading dot in the cookie domain), so it's available for wiki.example.org
, too.
The cookies content's may either be a full-fledged mediawiki cookie (which you need to create on your website), or a cookie with the relevant user information that an own extension to the wiki reads and logs the user in. I suggest having a look how Phpbb_Single_Sign-On is implemented and do the same for your site.
You can call MediaWiki API:Login on your site login routine and API:Logout on logout routine, provide the username and password used on your site and wiki are the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With