Reputation: 1224
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?
Upvotes: 6
Views: 3077
Reputation: 81
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.
Upvotes: 2
Reputation: 31147
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.
Upvotes: 9