I'm trying to figure out how to have two separate login pages: the default entry for the page .comand one for specific users, for example, for the route /special.
Is this possible in one SF2 project?
UPDATE:
I have the following configuration in my firewall (I use fosub)
providers:
custom:
id: ib.user_provider
fos_userbundle:
id: fos_user.user_manager
my_fos_facebook_provider:
id: my.facebook.user
firewalls:
special:
pattern: ^/special
form_login:
provider: fos_userbundle
login_path: /special/login
check_path: /special/login_check
use_referer: false
default_target_path: /special
success_handler: ib.login_handler
provider: custom
main:
pattern: ^/.*
form_login:
provider: fos_userbundle
login_path: /login
check_path: /login_check
use_referer: false
default_target_path: /
provider: custom
fos_facebook:
always_use_default_target_path: true
app_url: "http://apps.facebook.com/%facebook_app_id%/"
server_url: "http://aw.com/aw/web/app_dev.php/"
login_path: /login
check_path: /login_check/facebook
default_target_path: /checkFB
success_handler: facebook_auth_success_handler
provider: my_fos_facebook_provider
logout:
target: /
anonymous: ~
In ib.login_handler, I have the following:
public function onAuthenticationSuccess(Request $request,TokenInterface $token)
{
if ($this->security->isGranted('ROLE_CATEGORIZER'))
{
$response = new RedirectResponse($this->router->generate('MyCoBundle_mailAdmin_index'));
}
return $response;
}
With this configuration, if I go to mydomain.com/special, I get the following error: Fehler: Umleitungsfehler (in English: error: redirect error)
UPDATE:
in chrome i get: route not found for "GET / special / login"
404 Not Found - NotFoundHttpException
1 linked Exception: ResourceNotFoundException »
I do not have a special route for this entry path. What I want to achieve is simply that the special user has only access to the pages under the outline / special.