Updated mediawiki auth_fas plugin to allow email addresses as login (infra #3080)
This commit is contained in:
parent
74e6ff59f1
commit
135c1df697
1 changed files with 5 additions and 4 deletions
|
@ -9,10 +9,11 @@ class Auth_FAS extends AuthPlugin {
|
|||
$username = strtolower( $username);
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://admin.fedoraproject.org/accounts/json/person_by_username?tg_format=json');
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://admin.fedoraproject.org/accounts/home');
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Mediawiki FAS Auth 0.9.1");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=".urlencode($username)."&user_name=".urlencode($username)."&password=".urlencode($password)."&login=Login");
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Mediawiki FAS Auth 0.9.2");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "user_name=".urlencode($username)."&password=".urlencode($password)."&login=Login");
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
# WARNING: Never enable this line when running in production, as it will
|
||||
|
@ -117,7 +118,7 @@ class Auth_FAS extends AuthPlugin {
|
|||
*/
|
||||
$wgExtensionCredits['other'][] = array(
|
||||
'name' => 'Auth_FAS',
|
||||
'version' => '0.9.1',
|
||||
'version' => '0.9.2',
|
||||
'author' => 'Nigel Jones',
|
||||
'description' => 'Authorisation plugin allowing login with FAS2 accounts'
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue