Answer the question
In order to leave comments, you need to log in
How to get the name of an authorized Windows user on a site?
There is a small corporate site. It spins inside the corporate network, there is no outside access. Authorization is configured on it using Apache. Apache, using the mod_authnz_sspi module, picks up the domain user and goes to the directory to check if the user has access to the page. The browser is configured. Everything is working.
It is necessary to display a line with the user's name on one of the pages. If I understand correctly, then the browser knows what kind of user is logged in. The problem is that the page on which this needs to be done is just plain html. Where can you get this information?
Answer the question
In order to leave comments, you need to log in
The first way is possible if you inject JavaScript code on the page that can get environment variables with a function like getenv(). If there is a desired variable there (I just don't know).
The second way to give from the server is like $user = $_SERVER['AUTH_USER']; to php, but you have to screw php and embed the code into the page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question