Hello there,

I think my issue is simply that I don't know how to do, because I think the need is quite common, I hope at least! Here is my scenario:

Most of my users have a value in $_SERVER['REMOTE_USER'] coming from the server. Whatever their account exists or not in Drupal, as I checked the box "Automatically create user..." it works fine.

BUT some of these same users will have nothing in $_SERVER ['REMOTE_USER'] on purpose (the auth is a Kerberos auth sent to the server by their computer, but they can login from their personnal computer, where they don't have Kerberos ofc). What I would like simply in this case is that they are redirected to 'webserver_auth_login_url' so the regular login can happen (let me clarify that the auth is not done by Drupal even in such scenario, in the backend I have a specific logic to auth the user with an external webservice. So I don't care about the password saved in Drupal for that).

But from code in webserver_auth_boot(), if _webserver_auth_retrieve_remote_user() fails nothing happen, the $_COOKIE['webserver_auth'] is not even used so the redirection loop can't be avoided.

Them my question is: am I missing something for doing this? Or is it simply impossible?
To go further, what is the purpose of setting up webserver_auth_login_url if it can't be used in this case?

Many thanks in advance for your support.

Comments

Antoine Vigneau created an issue. See original summary.

Antoine Vigneau’s picture

Issue summary: View changes