S
S
Stanislav Shendakov2020-05-08 06:18:12
symfony
Stanislav Shendakov, 2020-05-08 06:18:12

How to build automatic authorization when entering the site?

Good afternoon.

It is required to build automatic authorization when entering a site with Symfony 5 without a registration form. The site is running on IIS, and the current user login will be in the $_SERVER['AUTH_USER'] variable. This is the login you need to use. How can this be built?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-05-08
@shindax

Disable anonymous authorization, leave only WINDOWS authorization, IIS will do the rest for you.
https://forums.iis.net/t/1165306.aspx?IIS+Issues+A...
https://support.microsoft.com/en-us/help/323176/ho...
web.config
<authentication mode="Windows" />
Access group only

<configuration>  <system.web>    <authorization>      <allow roles="domainname\Managers" />      <deny users="*" />    </authorization>  </system.web></configuration>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question