[wp-hackers] Single sign-on with Wordpress & Mediawiki
Sneaks
0vcqn5q02 at sneakemail.com
Fri Oct 26 19:32:44 GMT 2007
thats an interesting idea. i suppose i could hook into the wp cookie
functions and set the mediawiki authentication cookies.
last night i was playing around and set WP's cookie root to /, and was
using:
include($_SERVER[DOCUMENT_ROOT]."/blog/wp-blog-header.php");
auth_redirect();
wp_get_current_user();
in a mediawiki auth plugin. i think that direction would also work, but
i'm worried about the lack of user data in the mediawiki db.
Callum Macdonald lists.automattic.com-at-callum-macdonald.com
|wordpress| wrote:
> Logging a user into WP via the cookie is relatively simple. Check out
> pluggable.php for the wp_setcookie() function.
>
> Two cookies handle the login:
> wordpressuser_MD5OFSITEURL
> wordpresspass_MD5OFSITEURL
>
> The user cookie takes the username in plain text, the pass takes a
> double md5 of the password (just md5 what's in the user db).
>
> We're integrating WPMU login with another system, so we're writing our
> users to the wp user db then setting the cookies for WP. WP doesn't
> handle any login or logout functions.
>
> Cheers - Callum.
>
> [1]
> http://trac.wordpress.org/browser/trunk/wp-includes/pluggable.php?rev=6291#L458
>
>
> Bertrand wrote:
>> Anyone have any idea how to share cookies from WP to Mediawiki? I know
>> there's lots of work out there to share db tables, but I don't want
>> users to have to sign in twice.
>>
>> The ideal would be that Mediawiki reads the cookies from WP, but I
>> don't know how many side effects this would have.
>>
>> B
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list