Topic on Project:Support desk

Login Authentication Issue

5
59.163.27.11 (talkcontribs)

Hi,

I got the username from sso, without password authentication that user should login into my mediawiki, how ? and which file?

Mediawiki 1.21

88.130.74.212 (talkcontribs)

Hi!

Are you trying to set up SSO for MediaWiki or is it already set up an you want to know, how to log in?

125.19.34.86 (talkcontribs)

SSO already there from one common application im getting the user name,, for ex consider one user "111" i got the user name from that sso response, in mediawiki 111 user should login automatically without any other authentication,

in mediawiki index.php i got that userid, then how to proceed to set login cookies, for automatic login,

without any extension

Florianschmidtwelzow (talkcontribs)

Without any extension this is nearly impossible :) It's not enough to get the username from elsewhere (i hope, that you don't edit the index.php ;)). MediaWiki povides the AuthPlugin and the hook Manual:Hooks/UserLoadFromSession with which you can implement an external authentication :)

Maybe you want to use LDAP? Then here is an extension that provides LDAP auth for MediaWiki ( i haven't tested it): Extension:LDAP_Authentication

125.19.34.86 (talkcontribs)

ok but in previous ver of mediawiki which i used 1.12 authentication code did in index.php

$user_from = $_SERVER['HTTP_SM_USER'];

$wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );

$wgUser=User::newFromName( $user_from );

wfSetupSession();

$wgUser->setCookies();


in the above $user_from is user name which get from response of someother application,.

Reply to "Login Authentication Issue"