Try it with this in your config first:

  encoders:
    Symfony\Component\Security\Core\User\AccountInterface:
      algorithm: plaintext


And work from there...


../Frenck

On 10 feb, 05:26, Klaas Naaijkens <[email protected]> wrote:
> Hi, I am struggling with the security system in symfony2 for about a
> day now.
>
> I have this in my config_dev.yml (running with the latest version of
> symfony2 github)
> ---------
> security.config:
>    providers:
>        main:
>            users:
>                foo: { password: foo }
>
>    firewalls:
>        main:
>            http-basic: true
>
>    access_control:
>        - { path: /.*, role: ROLE_USER }
>
>    encoders:
>        HelloBundle/Entity/User: plaintext
> ----------
> Then I get this error.
>
> No encoder has been configured for account
> "Symfony\Component\Security\Core\User\User".
>
> Stack Trace
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Core/Encoder/EncoderFactory.php
> line 75 »
>            }
>        }
>        throw new \InvalidArgumentException(sprintf('No encoder has
> been configured for account "%s".', get_class($account)));
>    }}
>
> at EncoderFactory->createEncoder(object(User))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Core/Encoder/EncoderFactory.php
> line 43 »
> at EncoderFactory->getEncoder(object(User))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Core/Authentication/Provider/DaoAuthenticationProvider.php
> line 65 »
> at DaoAuthenticationProvider->checkAuthentication(object(User),
> object(UsernamePasswordToken))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Core/Authentication/Provider/UserAuthenticationProvider.php
> line 70 »
> at UserAuthenticationProvider->authenticate(object(UsernamePasswordToken))
>
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Core/Authentication/AuthenticationProviderManager.php
> line 61 »
> at AuthenticationProviderManager->authenticate(object(UsernamePasswordToken))
>
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Http/Firewall/BasicAuthenticationListener.php
> line 97 »
> at BasicAuthenticationListener->handle(object(Event))
> at call_user_func(array(object(BasicAuthenticationListener),
> 'handle'), object(Event))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Bundle/
> FrameworkBundle/Debug/EventDispatcher.php
> line 72 »
> at EventDispatcher->notifyUntil(object(Event))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> Security/Http/Firewall.php
> line 88 »
> at Firewall->handle(object(Event))
> at call_user_func(array(object(Firewall), 'handle'), object(Event))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Bundle/
> FrameworkBundle/Debug/EventDispatcher.php
> line 72 »
> at EventDispatcher->notifyUntil(object(Event))
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> HttpKernel/bootstrap.php
> line 378 »
> at HttpKernel->handleRaw(object(Request), '1')
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> HttpKernel/bootstrap.php
> line 361 »
> at HttpKernel->handle(object(Request), '1', true)
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Bundle/
> FrameworkBundle/HttpKernel.php
> line 39 »
> at HttpKernel->handle(object(Request), '1', true)
> in /home/klaas/code/LPbackend/vendor/symfony/src/Symfony/Component/
> HttpKernel/bootstrap.php
> line 534 »
> at Kernel->handle(object(Request))
> in /home/klaas/code/LPbackend/web/app_dev.php line 15 »
>
> Any ideas?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to