I am working with single page application. Here I have backends controller was extended from a single backends controller... I have put some login check in backends controller..
What I want is... If Auth::check return false... I need the fuel do response 401. And stop execution of further.. I put the login check in before() of backends controller.
When ever I access the URL without logged in.. I get 200.
What is issue...I need 401 if I am not a logged in user.
You can't send a 401 back, unless you use basic or digest authentication, and you also send WWW-Authenticate headers back causing the browser to prompt for authentication.
Is that what you want?
If not, do you just want to set a status, of do you want to return some sort of no-access page as well?