Is it possible to make it so Symfony will ask for http_basic authentification only if the client IP isn't in the list of the firewall?
If yes, can someone provide me a clear small example on how to do it?
Is it possible to make it so Symfony will ask for http_basic authentification only if the client IP isn't in the list of the firewall?
If yes, can someone provide me a clear small example on how to do it?
You can do this with access_control:
security:
# ...
firewalls:
main:
anonymous: ~
http_basic: ~
access_control:
- { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
- { path: ^/, roles: ROLE_USER }