I'm trying to get ShibbolethBundle
(https://github.com/rmoreas/ShibbolethBundle) work. But stuck with creating a new user on login. I found out that the userProvider
is not the correct class (the one that implements ShibbolethUserProviderInterface
on here https://github.com/rmoreas/ShibbolethBundle/blob/master/Security/ShibbolethAuthProvider.php#L109
My custom provider is defined like this:
namespace Meot\FormBundle\Entity;
...
class UserRepository extends EntityRepository implements ShibbolethUserProviderInterface {
...
}
Security.xml
....
security:
providers:
main_provider:
entity: { class: Meot\FormBundle\Entity\User }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
secured_area:
pattern: ^/
shibboleth: ~
logout:
path: /logout
target: /
success_handler: security.logout.handler.shibboleth
I found this cookbook (http://symfony.com/doc/current/cookbook/security/entity_provider.html) states
To finish the implementation, the configuration of the security layer must be changed to tell Symfony to use the new custom entity provider instead of the generic Doctrine entity provider. It's trivial to achieve by removing the property field in the security.providers.administrators.entity section of the security.yml file.
Tried it, didn't work. The class of user provider is still Symfony\Bridge\Doctrine\Security\User\EntityUserProvider
.
I'm wondering by removing the property field, how Symfony is able to find my custom user provider?
Thanks.