Last modified: 2013-08-10 17:35:50 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].
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.
Mass maintainer change.
A solution is in the pipe and will be published mid April 2013.
A good solution has been developed, is in the pipe and will be published until end of May 2013.
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 ***