I am trying to set up authentication and authorization in my ASP.NET Core 3.0 Web Application. Users must be able to authenticate using their user principal name and password. I need to then retrieve their group memberships in order to determine their roles.
I have found some articles in various sources, suggesting the use of the Microsoft.Windows.Compatibility NuGet package. However, I am missing how to 'glue' all this together.
My main point of reference is this SO question: ASP.NET Core 2.0 LDAP Active Directory Authentication
My three main questions are:
- Where does the authentication code sit in the code structure? Separate namespace, class, etc?
- How do I configure this in my ConfigureServices method?
- How does this all fit into the ASP authentication/authorization structure?
I was expecting to see some way of extending the .AddAuthentication() method to cover then authentication, but I cannot work out how.
Could anyone please point out what I am missing?
Thanks