TitusPiJean v1 is higher than this latest version. People will therefor always install v1. Is this intended?
LDAP login extension
- Edited
luceos That's something I was afraid of. Should I remove the v1.0 release?
Actually maybe not, since v1.0 is not compatible with flarum > v0.1.0-beta.10 ?
v1.0 release removed from packagist, and instructions added to post above.
TitusPiJean remove it from github as well (under releases and tags) otherwise it will be automatically readded.
- Edited
rob006 I will remove them too, but that is weird. I tested earlier, and the beta.12 version was automatically chosen by composer. (Edit: they were already removed from Packagist)
Hmm, it looks like Packagist is ignoring these tags for some reason - they're not listed on: https://packagist.org/packages/tituspijean/flarum-ext-auth-ldap
It is still worth to remove them to keep versions list more sane.
BTW: https://github.com/tituspijean/flarum-ext-auth-ssowat/releases has the same problem, but in this case these old versions are recognized by Packagist: https://packagist.org/packages/tituspijean/flarum-ext-auth-ssowat
rob006 Thanks for the headsup! Will do the same and self-loathe about my newbiness.
This plugin is now plainly functional for most of basic/conventional ldap configurations. For my organization, it was the main condition to achieve a transition from Discourse ! Lot of thanks to @TitusPiJean and CodazziS for having made it possible
Hi, I got the error "An error occurred while trying to load this page."
oguzhan please copy any relevant error message from the Flarum log files (<flarum>/storage/logs
) or the javascript console.
oguzhan Hi, as clarwinkelmann said, please report your logs because your error is quite undescriptive. I also encourage you to post your issue on GitHub.
- Edited
[2020-04-20 06:57:32] production.ERROR: LdapRecord\LdapRecordException: LDAP error: (ldap_bind(): Unable to bind to server: Invalid credentials) in C:\xampp\htdocs\flarum\vendor\tituspijean\flarum-ext-auth-ldap\src\Controllers\LDAPAuthController.php:98
Stack trace:
#0 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\RouteHandlerFactory.php(38): TitusPiJean\Flarum\Auth\LDAP\Controllers\LDAPAuthController->handle(Object(Laminas\Diactoros\ServerRequest))
#1 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#2 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\DispatchRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#3 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\ShareErrorsFromSession.php(56): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#4 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\ShareErrorsFromSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#5 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\SetLocale.php(50): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#6 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#7 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\CheckCsrfToken.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#8 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#9 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#10 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#11 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\RememberFromCookie.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#12 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#13 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#14 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#15 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\CollectGarbage.php(46): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#16 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\CollectGarbage->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#17 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#18 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#19 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Middleware\HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#20 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#21 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#22 C:\xampp\htdocs\flarum\vendor\middlewares\request-handler\src\RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#23 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#24 C:\xampp\htdocs\flarum\vendor\middlewares\base-path-router\src\BasePathRouter.php(97): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#25 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#26 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Middleware\OriginalMessages.php(42): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#27 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#28 C:\xampp\htdocs\flarum\vendor\middlewares\base-path\src\BasePath.php(53): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#29 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#30 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#31 C:\xampp\htdocs\flarum\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#32 C:\xampp\htdocs\flarum\vendor\laminas\laminas-httphandlerrunner\src\RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#33 C:\xampp\htdocs\flarum\vendor\flarum\core\src\Http\Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#34 C:\xampp\htdocs\flarum\public\index.php(26): Flarum\Http\Server->listen()
#35 {main}
thanks in advance
oguzhan Unable to bind to server: Invalid credentials
This means that whatever user your using to connect to your LDAP server for binding purposes is failing authentication. Make sure that the user DN and user password is correct and that the user has permission to read LDAP objects.
thanks. But now got error
[2020-04-20 08:14:02] production.ERROR: LdapRecord\LdapRecordException: LDAP error: (ErrorException: ldap_search(): Search: Operations error in C:\xampp\htdocs\flarum\vendor\directorytree\ldaprecord\src\Ldap.php:476
Stack trace:
#0 [internal function]: LdapRecord\Ldap->LdapRecord{closure}(2, 'ldap_search(): ...', 'C:\xampp\htdocs...', 476, Array)
oguzhan Sorry, again, to be blunt with you: please read about proper etiquette. You are stating "I got error" here and on GitHub, without telling us anything about what you want to achieve and what you are doing. We simply cannot help you without more information on your configuration.
- Edited
- Compatibility checked for beta.13
- Overhaul of the logging in and registration algorithm to make them
- compatible with Active Directory
- always use distinguished names to identify users, and not the key used to find them
By the way, if some could explain to me what should be set as registration payload...
- Added French translation
- Improved locales: namely, "Remove Flarum login" is actually "Hide Flarum's standard login method" (still available through the API)
Hi, I use below docker image on AWS ECS and command "extension require".
But happend this message.
How to fix it?
https://github.com/mondediefr/docker-flarum
docker exec -it (container ID) extension require tituspijean/flarum-ext-auth-ldap
1/3: http://repo.packagist.org/p/provider-latest$5abf9a454a4dce447409b05eb3e0b888356211aa3879fc0bcb49250b014cb170.json
2/3: http://repo.packagist.org/p/provider-2020-04$7c4da4c551d807dc1d82e6d4d9a36c297bc2705ef96d91e3c4465ddf9387a535.json
3/3: http://repo.packagist.org/p/provider-2020-01$d81381eea44d67926254970618037536157fb2d2bd1c71bf6248a4d6d19040e9.json
Finished: success: 3, skipped: 0, failure: 0, total: 3
Using version ^0.1.0@beta for tituspijean/flarum-ext-auth-ldap
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- tituspijean/flarum-ext-auth-ldap v0.1.0-beta.12-1 requires directorytree/ldaprecord v1.2.13 -> satisfiable by directorytree/ldaprecord[v1.2.13].
- tituspijean/flarum-ext-auth-ldap v0.1.0-beta.12-2 requires directorytree/ldaprecord v1.2.13 -> satisfiable by directorytree/ldaprecord[v1.2.13].
- tituspijean/flarum-ext-auth-ldap v0.1.0-beta.13-1 requires directorytree/ldaprecord v1.2.13 -> satisfiable by directorytree/ldaprecord[v1.2.13].
- tituspijean/flarum-ext-auth-ldap v0.1.0-beta.13-2 requires directorytree/ldaprecord v1.2.13 -> satisfiable by directorytree/ldaprecord[v1.2.13].
- tituspijean/flarum-ext-auth-ldap v0.1.0-beta.12 requires adldap2/adldap2 v10.2.3 -> satisfiable by adldap2/adldap2[v10.2.3].
- directorytree/ldaprecord v1.2.13 requires ext-ldap * -> the requested PHP extension ldap is missing from your system.
- adldap2/adldap2 v10.2.3 requires ext-ldap * -> the requested PHP extension ldap is missing from your system.
- Installation request for tituspijean/flarum-ext-auth-ldap ^0.1.0@beta -> satisfiable by tituspijean/flarum-ext-auth-ldap[v0.1.0-beta.12, v0.1.0-beta.12-1, v0.1.0-beta.12-2, v0.1.0-beta.13-1, v0.1.0-beta.13-2].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php7/php.ini
- /etc/php7/conf.d/00_ctype.ini
- /etc/php7/conf.d/00_curl.ini
- /etc/php7/conf.d/00_dom.ini
- /etc/php7/conf.d/00_fileinfo.ini
- /etc/php7/conf.d/00_gd.ini
- /etc/php7/conf.d/00_iconv.ini
- /etc/php7/conf.d/00_intl.ini
- /etc/php7/conf.d/00_json.ini
- /etc/php7/conf.d/00_mbstring.ini
- /etc/php7/conf.d/00_opcache.ini
- /etc/php7/conf.d/00_openssl.ini
- /etc/php7/conf.d/00_pdo.ini
- /etc/php7/conf.d/00_session.ini
- /etc/php7/conf.d/00_tokenizer.ini
- /etc/php7/conf.d/00_xmlwriter.ini
- /etc/php7/conf.d/00_zip.ini
- /etc/php7/conf.d/01_exif.ini
- /etc/php7/conf.d/01_mysqlnd.ini
- /etc/php7/conf.d/01_phar.ini
- /etc/php7/conf.d/02_pdo_mysql.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Thank you in advance.
keisuke You need to install PHP's LDAP extension.
I think a apk add php7-ldap
beforehand should help, or within the dockerfile amongst all the others php7-...
.
- Edited
TitusPiJean
Thanks! I solved my question by making dockerfile.
This plugin is very useful!