sshambar / externalauth Goto Github PK
View Code? Open in Web Editor NEWPiwigo plugin that supports login via webserver provided identity
Home Page: https://piwigo.org/ext/extension_view.php?eid=894
License: GNU General Public License v2.0
Piwigo plugin that supports login via webserver provided identity
Home Page: https://piwigo.org/ext/extension_view.php?eid=894
License: GNU General Public License v2.0
Hi there!
Before using ExternalAuth which gets User by Apache2 > Kerberos > REMOTE_USER to Piwigo, i have had running the Plugin Ldap_Login. The Plugin Ldap_Login creates the user with a correct E-Mail address, but with only ExternalAuth no E-Mail is given for new users.
So can I run ExternalAuth in any way with Ldap_Login? ExternalAuth is passing username to Ldap_Login and Ldap_Login is creating the user as before?
Thanks for any help :) Nice plugin by the way!
In the OpenID Connect settings php warnings are displayed.
`
Warning: Undefined array key
/www/htdocs/[domain]/_data/templates_c/p6jhns^7250c247f4231f31f2b0821301f002b673f330a3_0.file.config.tpl.php on line 84
[domain]/_data/templates_c/p6jhns^7250c247f4231f31f2b0821301f002b673f330a3_0.file.config.tpl.php on line 91
Warning: Attempt to read property "value" on null in [domain]/_data/templates_c/p6jhns^7250c247f4231f31f2b0821301f002b673f330a3_0.file.config.tpl.php on line 91
">
`
Hi,
I get a 401 error while trying to use the Piwigo NG app while using this plugin. Is it true that isn't working at the moment? Could be that I'm getting something wrong..
Tim
https://example.com/piwigo/admin.php?page=plugin-ExternalAuth results in
Fatal error: Uncaught Error: Call to undefined function array_key_first() in /piwigo/plugins/ExternalAuth/admin.php:112 Stack trace: #0 /piwigo/plugins/ExternalAuth/admin.php(402): ExternalAuthAdmin->get_tab() #1 /piwigo/include/functions_plugins.inc.php(264): ExternalAuthAdmin->add_layout() #2 /piwigo/include/page_header.php(84): trigger_notify('loc_end_page_he...') #3 /piwigo/admin.php(320): include('/...') #4 {main} thrown in /piwigo/plugins/ExternalAuth/admin.php on line 112
The obvious reason for this is that array_key_first() is described by https://www.php.net/manual/en/function.array-key-first.php as (PHP 7 >= 7.3.0) and I'm only running PHP: 7.2.27-6+ubuntu16.04.1+deb.sury.org+1 (which is limited by my current hosting provider.)
https://piwigo.org/doc/doku.php?id=user_documentation:learn:install:before shows the requirements for Piwigo as PHP 5.3 (recommended 7.0 or 7.1) so 7.3 is kind of a stretch. If the minimum were bumped, all the cruft from pwg_password_hash could be removed, so it looks like there's no push to increase the minimum, certainly not to 7.3. There are some workarounds in the comments on https://www.php.net/manual/en/function.array-key-first.php.
First of all, thanks for this nice plugin!
I'm using it in combination with Caddy in front of Piwigo and these Caddy plugins:
I use it to let people log in to my album with a Google or Azure (Hotmail, outlook, etc etc account). It forwards some user details in specific HTTP headers. One of them I used in this plugin as the source for the username.
What would be a great addition is to also do the same for the user's email address. Now it's only possible to set the user's name + some fixed domain as a email address. But as the real email is in the OpenID Connect token from Google/Azure, I want to get it from there.
The chance that every visitor is under one domain with his email is also near zero.
So first a very brief background providing motivation for this. Currently piwigo allows using apache native authentication, and ExternalAuth extends that elegantly. I'd like to use piwigo for a family photo site that also has genealogical information (produced by GRAMPS.) Since genealogical information is just an extensive set of html files, it makes sense to just add a .htaccess file and let apache do all the authentication for both sites with piwgo doing the limited user management. I had done some proof-of-concept work to incorporate user managed passwords into piwigo, but it's clear to me this code would be better placed in a plugin (ideally just extending ExternalAuth.) I don't have much experience with PHP and confess I'm a little lost in the plugin mechanism so if someone else wants to incorporate the attached code, or give me some hints on how to go about incorporating it into a plugin, I would really appreciate it. I do fully understand my quick-and-dirty implementation isn't the most elegant solution and probably isn't the ideal way to integrate into piwigo. Thanks for any help/advice.
piwigo.diff.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.