So, I'm migrating an application built with ASP.Net 4.7 to .Net 5 (using preview 7).
One of the things that the old app does is validating a user against Active Directory. The goal is not to implement Authentication with Active Directory. I want to use the same approach: Only validate the user agains AD, and then, if the validation is OK, I will handle the authentication in another way.
Old code:
Membership.ValidateUser(model.UserName, model.Password)
What is the way to do it in .Net 5? (Or .Net Core, since almost every basic stuff is working the same way, at least when comparing to .Net Core 3.1)