Page MenuHomePhabricator

Separate UserLogin from authentication process; create account creation and identification internal API
Closed, DuplicatePublic

Description

Author: rgomes1997

Description:
At the moment, UserLogin is concentrating too much responsability:

  1. Displays and manage a form intended for gathering login information;
  2. Displays and manage a form intended for gathering information for a new account (create new account link)
  3. Manages part of authentication process;
  4. Coordinates creation of a new account.

From the 'object orientation' point of view, clearly UserLogin should be split on smaller components.
UserLogin, IMHO, should be *only* reponsible for

  1. Displays and manage a form intended for gathering login information;

Other tasks should be managed by their corresponding responsible classes.
In fact, it does not matter whether Mediawiki is object oriented or not. Object orientation is a very useful (and helpful!) concept which can be implemented even in bash scripts. Object orientation (or at least the concept) allows better organization of code, it's easy to maintain, easier to extend and easier to adjust to specific needs.

I've integrated LDAP authentication in our wiki and it was a nightmare :(
Now I'd like to replace LDAP by SAML and it's another nightmare, not working yet :(

Separating concerns on different classes would allow easier integration with several authentication layers.

  • One thing is getting username/password/domain from a form.
  • Another thing is using username/passoword for authenticating against a certain authentication layer.
  • Another thing is obtaining data required for registration and coordinating the registration workflow.
  • Another thing is performing the steps required to create a new account in a certain respository.

A good example which shows how integration is tangled can be seem at: https://ow.feide.no/simplesamlphp:mediawiki
and the corresponding 'plugin' provided by: https://ow.feide.no/_media/simplesamlphp:simplesamlphp-mw.php.zip?id=simplesamlphp%3Amediawiki&cache=cache

Thanks very much

Richard Gomes
http://www.jquantlib.org/index.php/User:RichardGomes


Version: unspecified
Severity: normal

Details

Reference
bz17312

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
ResolvedMarkTraceur
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
OpenNone
DuplicateNone
OpenNone
ResolvedJdlrobson
ResolvedBUG REPORTmatmarex
Resolvedmatmarex
OpenFeatureNone
OpenNone
ResolvedEsanders
DuplicateNone
ResolvedTTO
ResolvedJayprakash12345
DuplicateNone
OpenNone
ResolvedNone
Resolved Deskana
ResolvedAnomie
Resolvedmatmarex
ResolvedAnomie
OpenNone
ResolvedAnomie
OpenNone
ResolvedTgr
ResolvedAnomie
OpenFeatureNone
OpenNone
DuplicateNone
ResolvedAnomie
ResolvedAnomie

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:30 PM
bzimport set Reference to bz17312.
bzimport added a subscriber: Unknown Object (MLST).

I've changed the summary to better reflect what's the purpose of this bug, which is quite a bit one.

This is basically a duplicate of bug 15700. Marking it as such.

  • This bug has been marked as a duplicate of bug 15700 ***

Not a duplicate, as bug 44628 comment 18 shows.

Change 27022 abandoned by Parent5446:
Re-implemented Special:Userlogin using FormSpecialPage.

Reason:
The rest of the login system needs to be fixed before the UI part.

https://gerrit.wikimedia.org/r/27022