Last post Dec 17, 2013 05:17 AM by raju dasa
Dec 17, 2013 03:14 AM|robby32|LINK
I have Web ApiController hooked up to AngularJS ... I have set up routes and WebApiConfig.cs ..
I have a link so that when the user logs in they can navigate to the users list page , but if they naviagte
like so http://localhost/default/#users then it prompts the user to open up a json file and once open all the details are available.
How can i make it so that if they try to naviagte without loggining in , then they are prompted and sent back to the login screen..
Dec 17, 2013 04:44 AM|damienBod|LINK
Here's an example
and here's the complete doc
There are many ways of doing it, start with the docs on this site, depends on your security requirements, enviroment
Dec 17, 2013 05:17 AM|raju dasa|LINK
You may need to create a filter which checks for request-header (X-Requested-With: XMLHttpRequest) to allow only ajax request.
or use the default filter: Authorization filter.