我试图让ShibbolethBundle(https://github.com/rmoreas/ShibbolethBundle)工作。但坚持在登录时创建新用户。我发现的userProvider不正确的类(在这里是一个实现ShibbolethUserProviderInterface https://github.com/rmoreas/ShibbolethBundle/blob/master/Security/ShibbolethAuthProvider.php#L109Symfony 2自定义用户提供商
我的自定义提供的定义是这样的:
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
我发现这本食谱(http://symfony.com/doc/current/cookbook/security/entity_provider.html)陈述
要finis在实现中,必须改变安全层 的配置,以告知Symfony使用新的自定义实体提供者 而不是通用的Doctrine实体提供者。通过删除security.yml 文件的security.providers.administrators.entity部分中的 属性字段可以实现 的微不足道。
试过了,没有工作。用户提供者的类仍然是“Symfony \ Bridge \ Doctrine \ Security \ User \ EntityUserProvider”。
我想知道通过删除属性字段,symfony如何能够找到我的自定义用户提供程序?
谢谢。