tags:

views:

93

answers:

2

Hi,

by default, using sfDGP, when i try to execute an action of an application with security activated, the signin form appears but the URL doesn't change to "frontend_dev.php/login".

So, what should I do the URL to "frontend_dev.php/login" ?

Regards

Javi

+1  A: 

Its been awhile since i dipped that deep, but if i recal correctly the security fowarding in Symfony uses an internal foward so that the server doesnt have to handle an entirely new request. When you use an internal forward like this the URL will not change, because as far as the client is concerned you are still at the same URL you initially requested.

You would need to create your own Security filter to replace the default sfBasicSecurityFilter i believe, and then you would also probably need to modify any instances in actions or elsewhere that use forward in response to invalid/non-existent credentials.

I dont think there is an easy way to do this, and honestly its not advisable if you do. There are probably other solutions to what you need to acheive... Why do you need the URL to change?

prodigitalson
prodigitalson said: "Why do you need the URL to change?". I like more that way, for example Facebook works that way..
Well i dont know that this is a road you want to travel down just for preference sake - if it made a difference functionally then ok, but it doesnt seem that you are saying it does. As i said before if you do this youre going to have to override a number of things, and AFAIK the only way to change this is to use an external forward (ie. supply a location header) which will incurr an extra http request to the server when none is needed. Further youre then going to have to create youre own way to grab the proper referrer for forwarding after login.
prodigitalson
A: 

If you're already on frontend_dev.php/ before you attempt to login, this should happen normally as part of default behaviour --- unless you've been changing settings somewhere. You can always replace the URL manually once you've signed in by adding /frontend_dev.php/. It will work as you're authenticated on the machine anyway.

Tom