Extension talk:GoogleAppsAuthentification

From MediaWiki.org
Jump to: navigation, search
Start a new discussion

Contents

Thread titleRepliesLast modified
Local Accounts?121:33, 14 February 2012
Unable to change user permissions of auto-created accounts318:36, 14 February 2012
Redirecting to login page after login017:43, 16 December 2011
Class DOMDocument not found in google_discovery.php017:25, 13 October 2011
Nonce error "OpenID authentication failed: Nonce already used or out of range"317:07, 29 August 2011

Local Accounts?

Is it possible to still allow local accounts while using this? The extension causes the wiki to automatically login with a GoogleApps account, but we have some third party individuals we'd still like to have access to our wiki without providing Google Apps accounts to.

76.10.122.19018:41, 14 February 2012

Hello, no you can't - it should be easy to modify the extension in order to allow it, but when we made the extension, our need was to have a transparent connection, with as little as possible burden for the end user...

BertrandGorge21:33, 14 February 2012
 

Unable to change user permissions of auto-created accounts

Those accounts comes with "@domain.com", and when I try to change their user rights with the special pages, I was given the error of "cannot edit uesr rights of other wiki".

Soon I found in the manual pages that I need to have the "userrights-interwiki" for my bureaucrat group, so I added that in my LocalSettings. Then I was given another error of "Database mydomain.com does not exist or is not local."

Any help~? I suggest not storing the username with the domain - since with this extension we are allowed to use google apps of only one domain - so with "@domain.com" doesn't really make much difference.

202.55.50.23618:04, 29 August 2011

What you say makes sense - I didn't know that MediaWiki accounts did interpret the @ sign somehow - anyway, it is easy to fix - just change the line that says " $username = $googleAccount['email']; ", with something like " $username = preg_replace('/@.*/', , $googleAccount['email']); " or something similar....

BertrandGorge06:46, 30 August 2011

Yes you're right. That's what I did too! Many thanks! Highly appreciate the quick response from you.

Ewcy07:10, 30 August 2011

I added the following to LocalSettings.php:

  1. Allow @ in username (# as delimiter for database instead of @)

$wgUserrightsInterwikiDelimiter = '#'

This changes the interwiki delimiter to a # instead of an @, allowing you to have @ in your username without trouble. I doubt anybody uses interwiki rights management except the Wikimedia Foundation itself; I really wish they just had interwiki disabled by default. Oh well.

76.10.122.19018:36, 14 February 2012
 
 
 

Redirecting to login page after login

I was having an issue where after logging in from the home page, mediawiki would bring you straight back to the login page with a username and password field.

So I modified this code:

       // Return URL
       $config['return_server'] = (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://') .$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'];
       $config['return_url'] = $config['return_server'].$_SERVER['REQUEST_URI'];

to

       // Return URL
       $config['return_server'] = (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://') .$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'];
       if ($_REQUEST["title"] == $lg->specialPage("Userlogin")) {
               $config['return_url'] = $config['return_server'].$_SERVER['SCRIPT_NAME'];
       }
       else {
               $config['return_url'] = $config['return_server'].$_SERVER['REQUEST_URI'];
       }

This resolved my issue.

208.97.104.19417:43, 16 December 2011

Class DOMDocument not found in google_discovery.php

I got a blank page after installing this extension, and the subject contains what was in the log. I installed php-xml and that fixed it so I decided to put this here in case anyone else has this problem.

208.90.215.18102:49, 13 October 2011

Nonce error "OpenID authentication failed: Nonce already used or out of range"

Sorry I don't know if it's the correct place to voice out questions - correct me if it's not.

I just did what you told me last night (29 Aug 2011). I was correctly redirected to the Google Apps login page, and also the subsequent "XXXXXXXX (my URL) wants to access the following information" (etc.). But then I was stopped at an error with only 1 line of output: "OpenID authentication failed: Nonce already used or out of range". Any clue on this?

Thanks! I love this great extension - simple, easy to use, just great.

219.79.162.8914:37, 29 August 2011

Did you make sure the tmp folder is writable ? Do you see the nounce files being created ?

BertrandGorge15:00, 29 August 2011
 

One thing is that we found that the extension doesn't work too well on a Windows setup - for some reason it started to work with a linux box only... Maybe a lead for you !

BertrandGorge15:03, 29 August 2011
 

Oh yeah problem solved.

1) I just noticed that the tmp folder that came with the OpenID library (as linked from the wiki page) was actually NOT empty. And so when I am setting the correct permissions to it, I need to recursively chmod-ing it. That is, " chmod -R 777 tmp " instead of " chmod 777 tmp ".

2) Once I have made the #1 change, I encountered another error of "undefined function: FileCache::singleton() on line 2726 of includes/GlobalFunctions.php", even when I used a new browser to browse the wiki. My mediawiki was an old one, 1.14 version. I didn't touch any configuration concerning FileCache (and it should default to "false" ?) The problem doesn't go away even I switch on or off FileCache in LocalSettings.php. My solution was to (dirtily) amend GlobalFunctions.php and comment out that if() block and use only the else block. (very dirty indeed!)

202.55.50.23617:07, 29 August 2011
 
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox