Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony2: Transparent authorization process between subdomains
    primarykey
    data
    text
    <p>All!</p> <p>I just see that symfony2 router doesn't use the host part of the uri. I need to separate COUNTRY as third subdomain and locale as first element in route path</p> <p>http://{country}.mysite.com/{_locale}/myaction, i.e.</p> <p>en.mysite.com/en/action --- english companies &amp; english language</p> <p>de.mysite.com/ru/action --- deutschland companies &amp; russian language</p> <p>ru.mysite.com/uk/action --- russian companies &amp; ukrainian language</p> <p>The problem solved with service like below:</p> <pre><code>-- config.yml services: kernel.listener.subdomain_listener: class: Acme\DemoBundle\Listener\SubdomainListener tags: - { name: kernel.event_listener, event: kernel.request, method: onDomainParse } -- SubdomainListener.php &lt;?php namespace Acme\DemoBundle\Listener; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\Event; class SubdomainListener { public function onDomainParse(Event $event) { $request = $event-&gt;getRequest(); $session = $request-&gt;getSession(); // todo: parsing subdomain to detect country $session-&gt;set('subdomain', $request-&gt;getHost()); } } </code></pre> <p>BUT... The question is: how It's possIble (right wAy) to implement AUTH process between several subdomains transparently only once ??</p> <ol> <li><p>user logged via en.mysite.com/{_locale}/...</p></li> <li><p>user going to de.mysite.com/{_locale}/... but system knows about him(her) and doesn't ask the login/password credentials again</p></li> </ol> <p>Does anybody help me ? Thanks for advance! Certified Senior Oracle Developer/DBA</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload