samedi 27 juin 2015

symfony2 security - disable login path and show forbidden

i am trying to prevent redirect to login page when user is trying to access a page without token, i have single page app and i am only putting the ajax requests under firewall and when a user is doing ajax without token i want the ajax to return forbidden exception so i will be able to catch it in client side

currently the ajax returns "Found" since the request is being redirected to the login page

i haven't found a solution in cookbook so far i dont want to use api tokens, only send an exception instead of redirecting to login

Aucun commentaire:

Enregistrer un commentaire