I've created a web application for internal use made of 2 layers:
GUI: SPA in Angular 2
Data: asp. net 5 web API
When I needed to authenticate users in the organization, I added windows authentication on my web api - config. This works fine when a user gets to a page where data is being retrieved, if he's not authorized he'll get a prompt.
Now I also need a way to tell a user that got to a page with no data - just html, that he is not allowed , or render my view to hide some of the links. When I use the web api for unauthorized users - before I even get to process the api server response - I get a browser prompt...
How can I tell the browser/server not to open this dialog, yet return a value saying that this user is authenticated?