doutuo4285 2013-06-13 11:16
浏览 16
已采纳

Symfony2 - 连锁提供商

I have 2 different bundles with 2 different routes.

/example1
/example2

I am trying to do a chain provider for these 2 different route to have a single sign on. They both are using a single entity for the users. I look at the chain providers which require 2 entities to use (not 100% sure about that)

 providers:
      members:
        entity: { class: SampleUserBundle:Member }
      chain_provider:
        chain:
          providers: [members]

firewalls:
      member:
        provider: members
        pattern: ^/example1
        anonymous: ~
      root:
        provider: members
        pattern: ^/example2
        anonymous: ~

I'm trying to redirect a link from /example1 to /example2 without logging in again. Appreciate anyone who can assist me in this new thing I'm learning. TIA!

  • 写回答

1条回答 默认 最新

  • dpxnrx11199 2013-06-13 20:33
    关注

    Why not use a single firewall for both route patterns?

    You only have to adjust your configuration regex pattern accordingly ...

    firewalls:
        member:
            provider: members
            pattern: ^/(example1|example2)
            anonymous: ~
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序