[英]symfony2 security firewall for DemoController
我創建了一個標准的symfony版本項目-2.3.8,帶有標准的演示和安全控制器
是否可以通過某種方式配置安全設置,使在SecuredController中進行身份驗證的用戶也可以在DemoController中看到?
對於未經身份驗證的用戶,DemoController也應該可見。
當我將模式設置為:
secured_area:
pattern: ^/demo/
使用不同的設置,未通過身份驗證的用戶看不到演示:
secured_area:
pattern: ^/demo/secured
通過SecuredCOntroller認證的用戶在DemoController中不可見
謝謝
在安全防火牆設置上方為您的非安全區域添加另一個防火牆:
non_secured:
pattern: ^api/public
anonymous: true
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.