I’m trying to get environment variables of the form AUTHENTICATE_COLUMN created by AuthDBDUserPWQuery as mentionned on apache doc. I noticed that they appear after restarting apache but vanish right after reloading a page.
auth part of my vhost:
<Location "/">
AuthType form
AuthName realm
ErrorDocument 401 "/login.php?%{QUERY_STRING}"
# To cache credentials, put socache ahead of dbd here
AuthFormProvider socache dbd
# Also required for caching: tell the cache to cache dbd lookups!
AuthnCacheProvideFor dbd
AuthnCacheContext my-server
# mod_authn_dbd SQL query to authenticate a user
AuthDBDUserPWQuery "SELECT pwd, first_name, last_name, username, email FROM user WHERE username = %s"
Session On
SessionCryptoPassphrase secret
SessionCookieName session path=/
</Location>
<Location "/user">
# mod_authz_core configuration
Require valid-user
</Location>
I didn’t find much about similar kind of issues and I’m slowly getting familiar with apache stuff.
What am I missing ? Should I do an additional query after login ?
Thank you for your help 🙂
PS: I’m using Docker image php-apache with mariadb.