aboutsummaryrefslogtreecommitdiffstats
path: root/includes/auth/PrimaryAuthenticationProvider.php
Commit message (Collapse)AuthorAgeFilesLines
* Remove 2-line PHPDocs that just repeat the types from the codethiemowmde2025-01-171-2/+0
| | | | | | | | | | | | | | | | Same as Ia294bf4 did for 1-line comments. This patch removes slightly more complex 2-line PHPDoc comments that don't add any new information to the code, but literally repeat what the code already says. They say "don't document the code, code the documentation", and we are doing this more and more. We just tend to forget to remove the obsolete comments. Note I'm also removing a line of text in a few cases when it's very short and literally says the same as the method name. Again, such comments add zero new information. Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
* auth: Clarify testUserForCreation documentationGergő Tisza2024-11-101-2/+2
| | | | | | | The documentation made it sound like the 'creating' flage is never true for autocreation, which would be incorrect. Change-Id: I2bc6086ece88bb796386222fe64494f45d432d46
* Add namespace to IDBAccessObject and DBAccessObjectUtilsJames D. Forrester2024-09-271-1/+1
| | | | | Bug: T353458 Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
* auth: Pass canAlwaysAutocreate from session to pre-auth providersErik Bernhardson2024-09-061-0/+2
| | | | | | | | | | | | | | | Session providers can provide a `canAlwaysAutocreate` flag which indicates account creation is exempt from autocreate permission checks. This is used, for example, for providers that provide users for supporting applications in a wiki farm. Pass that information along to pre-authentication providers so they can respect the intent of the flag. We cannot simply skip pre-authentication, it's used for non-permission-related things like preventing CentralAuth username conflicts. Bug: T373778 Change-Id: Ie3aeaf48e615e2fb85b2069203ab91ca0127ae05
* Remove more indirect calls to IDBAccessObject::READ_* constantsAmir Sarabadani2024-01-231-3/+4
| | | | | | | | | | Found via (?<!IDBAccessObject)::READ_ We are planning to deprecate and remove implementing IDBAccessObject interface just to use the constants. Bug: T354194 Change-Id: I89d442fa493b8e5332ce118e5bf13f13b8dd3477
* Namespace User under \MediaWiki\UserJames D. Forrester2023-09-191-1/+1
| | | | | Bug: T166010 Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
* Fix numerous PSR12.Properties.ConstantVisibility.NotFoundReedy2020-05-111-3/+3
| | | | Change-Id: I9b08bde11727f47e262f5f7f422eac5585ea7fca
* Change @inheritdoc to @inheritDocUmherirrender2017-08-111-1/+1
| | | | | | | Only @inheritDoc works for the Sniff MediaWiki.Commenting.FunctionComment Change-Id: I91fc02cda6701d790e4334fc2bc47f230955545c
* Expand SessionManager / AuthManager documentationGergő Tisza2016-08-301-16/+66
| | | | | | Bug: T110628 Bug: T142154 Change-Id: Ib0a41f01b3d12267b2a94ea1375e6d13cacd2b69
* AuthManager: do not rewrite PRIMARY_REQUIRED to REQUIREDGergő Tisza2016-08-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | AuthManager::getAuthenticationRequests() changes AuthenticationRequest::$required from REQUIRED to PRIMARY_REQUIRED if the request is from a primary; it made an exception when all primary providers returned a given request. That exception is not particularly useful (AuthenticationRequest::mergeFieldInfo() used to rely on it to determine which fields are required, but since I9d33bd2 that's not really needed), and knowing which request is from a primary is useful for other means. This changes required field semantics in a corner case: when a primary provider returns two required requests, the previous behavior was to assume that they are both required; the new one is to treat them as alternatives (as if they were returned by two different providers). So when all primary providers return request X, and one of them returns Y in addition, the fields of X will not be marked required, while previously that would have been the case. Instead of overcomplicating the interface for something that is unlikely to come up in any real use case, add a new requirement to PrimaryAuthenticationProvider that it should not return multiple required requests. Bug: T141471 Change-Id: I1c1f44d4d6b66f77c876e3459fb97f03483db744
* Add $options parameter for testUserForCreation()Brad Jorsch2016-06-201-1/+9
| | | | | | | | | | | | This will allow providers to know whether the call is just for testing (from ApiQueryUsers) or for actual creation, and skip duplicate work when testForAccountCreation() is going to be called. Change-Id: Id3ef713fd377135d78f66e5100dedd4689293b59 Depends-On: I4af8b3b692f60c42f8685b90be5936da7ba4e2e2 Depends-On: Ie9639a15d04b387be0e72754301eb6d91cd8adc2 Depends-On: I063cbdfbd9a223bf2391fce2b714ab82ddd3272f Depends-On: I7c67512634f6e72251911238f083857da9fd3f84
* Add AuthManagerBrad Jorsch2016-05-161-0/+334
This implements the AuthManager class and its needed interfaces and subclasses, and integrates them into the backend portion of MediaWiki. Integration with frontend portions of MediaWiki (e.g. ApiLogin, Special:Login) is left for a followup. Bug: T91699 Bug: T71589 Bug: T111299 Co-Authored-By: Gergő Tisza <gtisza@wikimedia.org> Change-Id: If89d24838e326fe25fe867d02181eebcfbb0e196