【发布时间】:2012-06-29 07:08:17
【问题描述】:
我是 Symfony2 的新手,需要创建一个自定义身份验证提供程序,所以我阅读了 How to create a custom Authentication Provider。 我创建了所有类,还有来自How to create a custom User Provider 的自定义用户提供程序,但我得到了这个异常:
RuntimeException: The parent definition "wsse.security.authentication.provider" defined for definition "security.authentication.provider.wsse.wsse_secured" does not exist.
我从 Cookbook 复制/粘贴了所有类和配置部分,只更改了我的 Bundlename。
【问题讨论】:
-
对于 WSSE,您可能想查看 github.com/mjhapp/MjhWsseBundle,这是捆绑在包中的 Symfony2 食谱文章。
-
我尝试将服务的定义移动到 app/config/security.yml 并且它可以工作。如果我按照教程所述在 bundle/Resources/config/services.yml 中定义它们,我不知道为什么它不起作用。
-
你的 DIC 是否将你的 services.yml 加载到你的包中?
-
是的,实际上我没有加载我的 services.yml 的 Bundle*Extension 类...
标签: authentication symfony provider