[Solved] How to identify user after authentication ?
Added by braselectron over 4 years ago
So I installed lighttpd on my Rpi/Raspbian and now I am exploring all the potential of lighttpd so I did this:
1) modified the config file to use Module: mod_auth for authentication of my authorized users
1.1) I avoid this way having to create individual accounts on my RPi/Raspbian.
2) each user need to download or access a certain directory
3) enable listing on selected url / directory
4) ...
All works good for downloading files that I previously put in each directory (for each user).
Now I would like to use PHP and creating a upload/download page for each user/directory but I would need a way to identify who is logged in (on that session) so I can customize the PHP script to set the appropriate upload/download directory for that specific user.
How do I do that using lighttpd ?
Replies (1)
RE: How to identify user after authentication ? - Added by gstrauss over 4 years ago
After mod_auth authenticates a user, it sets REMOTE_USER and AUTH_TYPE in the environment for backend processes (CGI, FastCGI, SCGI, etc)