I have a heavy client side webapp in AngularJS. I'm using a C# controller to do Active Directory authentication, here is this code.
public UserModel Get()
{
UserModel currentUser = new UserModel();
currentUser.name = User.Identity.Name;
// currentUser.auth = contactFromAD(User.Identity.Name);
currentUser.auth = true;
return currentUser;
}
So what its doing is checking what AD account you are logged into, then performing some logic to check if you are authenticated to access the site.
However how can I get this to work outside of localhost. When the code is running server, how can I get User.Identity.Name to return the identity of the person currently using the app.