Last modified: 2013-08-10 17:35:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23751, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21751 - [SUGGESTION] Need a way to customize default OpenID providers list
[SUGGESTION] Need a way to customize default OpenID providers list
Status: RESOLVED DUPLICATE of bug 44819
Product: MediaWiki extensions
Classification: Unclassified
OpenID (Other open bugs)
unspecified
All All
: High enhancement (vote)
: ---
Assigned To: T. Gries
:
Depends on:
Blocks: 44819
  Show dependency treegraph
 
Reported: 2009-12-03 17:44 UTC by Brion Vibber
Modified: 2013-08-10 17:35 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2009-12-03 17:44:02 UTC
Special:OpenIDLogin has a nice set of default providers, optionally with very attractive-looking icons for a nice layout.

I'd like to set up OpenID logins on the StatusNet wiki http://status.net/wiki/ with a handy button to authenticate against http://identi.ca/... I need to be able to alter the set of providers to include Identi.ca and make it the default, and possibly drop some others that are less interesting.


Unfortunately this seems very difficult to do without modifying the extension source in several unpleasant ways:

The list of providers is built in static functions on the OpenIDProvider class, which provide no configuration options or extension hooks -- you have to change the source code to add or remove items.

Message keys are used to specify the login prompts, so you need to devise an appropriate prompt string ("Log in using your Identi.ca account") and add it to the OpenID.i18n.php file -- again, changing the source code.

If you want provider icons on, you've got some more work -- you need to modify openid.css or otherwise find a way to add CSS to specify your icon. (The default provider icons are also into a sprite, which seems not to come with a script to regenerate it so it would be difficult to alter the default set during future maintenance.)

It would be nice also to be able to have the selection default to my preferred provider instead of the generic "OpenID" which asks you to input a full URL. Reordering the items in the list still leaves the plain OpenID selected by default, and removing it leaves us with an initially non-functional form. Initial selection seems to be spread out in several places, including but not limited to OpenIDProvider::getButtonHTML() [which sets the initial selection state on the icon, but doesn't set up the input form right].
Comment 1 Sergey Chernyshev 2009-12-03 23:11:49 UTC
Yes, I started rudimentary steps towards being able to customize the list, but as you noted it's far from being very simple.

Adding a provider consists of:

1 adding an icon to CSS sprite image (all icons are in skins/icons/ folder one by one) and corresponding lines to CSS. The intended way is to add an icon to skins/icons/ and then use sprite generator to generate a composite image as well as CSS rules. I used http://spritegen.website-performance.org/

2 add a line to either OpenIDProvider::getLargeProviders() or OpenIDProvider::getSmallProviders()

That should be it.

One way to move step 2 outside of code without loosing translation part is to create a couple generic parametrized messages like:

* "Log in using your $1 account" - for those providers that use generic URL
* "Enter your $1 username" - for those providers that require username substitution

Optimizing CSS for the buttons is possible, especially if we'll generate button-specific piece of it inline on the page, but needs more thought put into it.

Regarding having OpenID as default provider, I did it on purpose as picking any other wouldn't be fair for the default extension. This should probably be easy to fix though - just use global variable instead of 'openid' selector.



Comment 2 Siebrand Mazeland 2011-05-16 09:54:41 UTC
Mass maintainer change.
Comment 3 T. Gries 2013-03-27 22:12:06 UTC
A solution is in the pipe and will be published mid April 2013.
Comment 4 T. Gries 2013-05-07 06:57:19 UTC
A good solution has been developed, is in the pipe and will be published until end of May 2013.
Comment 5 T. Gries 2013-08-10 17:35:50 UTC
hello dear listeners and bug reporters, I am closing this now, because the solution is now ready, see https://gerrit.wikimedia.org/r/#/c/55287/ .

*** This bug has been marked as a duplicate of bug 44819 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links