I use Symfony Standard 2.0.0BETA1 and tried to configure http_basic authentication exactly the same as in this book chapter
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
providers:
main:
users:
foo: { password: testing, roles: ROLE_USER }
firewalls:
main:
pattern: /.*
http_basic: true
logout: true
access_control:
- { path: /.*, role: ROLE_USER }
Problem is when I try to open a page and i submit user name “foo” and password “testing” it simply loops and ask me for credential infinitely or display error page.
Steps to reproduce issue:
- Copy security configuration from http://symfony.com/doc/current/book/security/overview.html#configuration and past it to security.yml file
- Refresh app home page
- Enter valid credentials
Expected behavior is to see home page but instead credentials prompt is shown.
Does anyone know why that happens and how to fix it?
The http basic authentication is broken with PHP as cgi/fastCGI under Apache
There is a workaround:
app_dev.php
web/.htaccess
Source: symfony github issue