aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Connection.php
Commit message (Collapse)AuthorAgeFilesLines
* feat: add profile pronounsJohn Molakvoæ (skjnldsv)2024-09-171-0/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-2/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-301-34/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(ldap): sync additional properties to profile and SABJake Nabasny2024-05-301-0/+1
| | | | | | | | | | | | | | | Synced from LDAP to profile: - Date of birth Synced from LDAP to SAB (via the profile): - Biography - Date of birth Original code by Jake Nabasny (GitHub: @slapcat) Co-authored-by: Jake Nabasny <jake@nabasny.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* fix(user_ldap): Improve typing and fix a var nameCôme Chilliet2024-04-301-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix newly spotted psalm issues, add exhaustive typed magic properties ↵Côme Chilliet2024-04-301-41/+71
| | | | | | for LDAP classes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix typing issues related to resource migrationCôme Chilliet2024-04-091-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix small psalm errors in FTP and LDAP connectionsCôme Chilliet2024-04-091-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(user_ldap): Fix tests using wrong typesCôme Chilliet2024-04-091-1/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Remove obsolete resource typingCôme Chilliet2024-04-091-36/+15
| | | | | | In PHP>=8.1, LDAP and FTP resources are always typed objects Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* enh(LDAP): implement IIsAdmin interfaceArthur Schiwon2023-12-011-0/+1
| | | | | | | | - add configuration to specify one LDAP group acting as admin group (CLI) - implement `isAdmin()` method, basically relying on inGroup against the configured group Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(ldap): store last known user groupsArthur Schiwon2023-10-091-0/+4
| | | | | | - for LDAP user life cycle management Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #34443 from nextcloud/feat/add-enabled-user-backendCôme Chilliet2023-07-031-0/+1
|\ | | | | Add IProvideEnabledStateBackend interface
| * [user_ldap] Add per-connection setting for marking remnants as disabledCôme Chilliet2023-05-231-0/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Refactors "strpos" calls in /apps/user_ldap to improve code readability.Faraz Samapoor2023-06-021-1/+1
|/ | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* nice up the code handling AccountManagerMarc Hefter2023-04-061-1/+0
| | | | | | | | | | | merging defaultScopes from DEFAULT_SCOPES and account_manager.default_property_scope removing unneccessary profileScope setting (using config.php instead) honoring admin choice 'profile.enabled'=>false in config.php moved checking for empty array to updateProfile function corrected some typos and cleaned some comments Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* refined code, to be independend from OCP\IUserMarc Hefter2023-04-061-1/+1
| | | | | | | | | rework updateProfile in user_ldap/lib/User/User.php some cleanup at processAttributes in user_ldap/lib/User/User.php rearranged Fediverse attribute, to match profile layout Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* handling updateProfile with array of valuesMarc Hefter2023-04-061-0/+1
| | | | | | | | | using an array to buffer profile updates, like suggested by @come-nc clean some code and remove unneccessary redundancy added the Fediverse profile property Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* added user profile scope settingMarc Hefter2023-04-061-0/+1
| | | | | Signed-off-by: Marc Hefter <marchefter@march42.net> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* feature addition: [user_ldap] update user profile from LDAP; WIP; fixing ↵Marc Hefter2023-04-061-0/+1
| | | | | | | some uggly copy-and-paste errors; testing functionality; preparing and editing the documentation Signed-off-by: Marc Hefter <marchefter@march42.net> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* feature addition: [user_ldap] update user profile from LDAP; WIP ↵Marc Hefter2023-04-061-0/+7
| | | | | | work-in-progress; TODO update profile Signed-off-by: Marc Hefter <marchefter@march42.net>
* Apply a longer TTL of 15min to falling back on backup serverCôme Chilliet2022-12-201-4/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fixed backup host logicCôme Chilliet2022-12-191-26/+24
| | | | | | | Now forcing backup host applies to both main and background. And background will fallback to backup if not responding. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make code clearer for background hostCôme Chilliet2022-12-191-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use a dedicated LDAP host and port for background jobs if configuredCôme Chilliet2022-12-191-3/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #24574 from zenlord/ldapi-unix-socket-supportCôme Chilliet2022-12-081-1/+8
|\ | | | | Ldapi unix socket support
| * Add ldap-unix-socket support - squashed commits to files Connection.php, ↵Vincent Van Houtte2022-09-091-1/+8
| | | | | | | | | | | | Configuration.php, Wizard.php, LDAP.php and view.js Signed-off-by: Vincent Van Houtte <vvh@aplusv.be>
* | Merge pull request #35355 from nextcloud/artonge/feat/ldap_connection_timeoutblizzz2022-11-301-0/+4
|\ \ | | | | | | Allow to set a custom timeout for ldap connections
| * | Allow to set a custom timeout for ldap connectionsLouis Chemineau2022-11-231-0/+4
| |/ | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Improve a bit codestyleCôme Chilliet2022-11-221-3/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Log as warning instead of info when main LDAP server is unreachableCôme Chilliet2022-11-211-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Log switching to LDAP backup host because main one is not availableCôme Chilliet2022-11-171-5/+11
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Don't use slow hashing to check the LDAP bindingCarl Schwan2022-05-051-8/+3
| | | | | | | | | Using password_hash is expensive and should be used for hashing passwords when saving them in the database. Here we just want to see if the bind was already done with the given password, so use a fast hashing algorythm. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix unit testsCôme Chilliet2022-03-031-7/+31
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix types in OCA\User_LDAP\ConfigurationCôme Chilliet2022-03-031-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve typing in OCA\User_LDAP\Access and reduce psalm errorsCôme Chilliet2022-02-081-1/+1
| | | | | | | This should avoid some PHP warning using PHP 8.1 and help detecting type trouble early in the future. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix PHP 8.1 support for user_ldap applicationCôme Chilliet2021-12-161-3/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use Psr\Log\LoggerInterface where it can easily be used in user_ldapCôme Chilliet2021-10-141-34/+36
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add return type for writeToCacheDaniel Kesselberg2021-06-151-4/+2
| | | | | | writeToCache does not return a string. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* do not die after LDAP auth failed with expired accArthur Schiwon2021-03-011-3/+6
| | | | | | - some servers return error code 53 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use query builder instead of OC_DB in user_ldapJoas Schilling2020-11-061-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* tame psalm. why does it ignore '@property'?Arthur Schiwon2020-10-191-5/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* do not flip available state to unavailable, allow empty resultsArthur Schiwon2020-08-111-0/+1
| | | | | | | | | - the detection relies that the first, requested result is not empty - it might be empty though – groups without members - protect switching from available to unavailable - switching the other way around was also not envisaged either Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* tidy up Group_LDAPArthur Schiwon2020-06-081-0/+5
| | | | | | | | | | * remove unused method * resolve code duplication * remove usage of deprectad Util::writeLog * phpDoc updates * signature updates Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-58/+55
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>