Giter VIP home page Giter VIP logo

externalauth's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

externalauth's Issues

Attempt to read property "value" on null

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
">
`
Unbenannt

Add support for getting email from server variable

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.

Support using apache .htpasswd files as authentication store

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

Howto use ExternalAuth in combination with Plugin Ldap_Login

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!

Support in Piwigo NG app

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

Immediately throws an exception

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.