Custom LDAP authentication with web api in single page application

this is my scenario:
- I have a single page application running on AngularJS and Web Api (ASP.NET MVC) for the backend - I need to authenticate users based on LDAP and their "roles" written in a database table (basically users are logged with their credentials, I search for their username in the table and see if they go well)

My problem is how? Usually I just put some [Authorize] here and there and let IIS handle the LDAP problem. Now, however, I need to make sure that only a subset of users on the domain can access my pages (not just my web service!).

I wrote a filter so that only that subset of users can access the web service, but how can I allow access to the \ deny static resources? (for example HTML pages).
If I need to write a login page, how can I check for LDAP? How do I set this user as authenticated?



source to share

All Articles