[Solved] add current username on webpag( webapp)
Hello,
i need your help. On my Raspberry system runs lighttpd (using Basic/digest Authentication) as webserver to hoste my webpage (Webapp). Then i call my webapp on webbrowser(on my PC) the server ask me the authentication, i give its and all work fine. But i want to add or show the current username (what i give to authentication) on my Webapp, when access the webpage. Can someboby help me ? I am trying many way but nothing. Thanks
server.modules += ( "mod_dirlisting", "mod_staticfile", "mod_auth", "mod_authn_file" ) auth.cache = ("max-age" => "200") auth.backend = "plain" auth.backend.plain.userfile = "/var/www/user/lighttpd-plain.user" # insecure location; temporary; FIX auth.require = ( "" => ("method" => "digest", "algorithm" => "SHA-256", "realm" => "password protected area", "require" => "valid-user") )
Replies (3)
RE: add current username on webpag( webapp) - Added by gstrauss 12 months ago
Do not post basic user-help questions in the lighttpd issue tracker. The lighttpd issue tracker is for issues in lighttpd.
After successful authentication, REMOTE_USER
is set in the environment for backend scripts serving that authenticated request, e.g. mod_cgi, mod_fastcgi, mod_scgi, mod_ajp13, mod_magnet. Generate the page containing REMOTE_USER
or set a cookie in your script.
This website is for the lighttpd web server, not how to write client webapps.
RE: add current username on webpag( webapp) - Added by wissen 12 months ago
thanks for answer.
Could i also use XMLHttpRequest of Javascript to fetch its? or i only need backend scripts?
RE: [Solved] add current username on webpag( webapp) - Added by gstrauss 12 months ago
Asked and already answered.