I am developing a client-server application. In the usage of this application, clients and server have same AD (Active Directory) domain.
I want my server application to authenticate every client by its AD user. That means, that when a user runs an instance of the client application, the server should understand which AD user is using this instance of application and authenticate it. So, client application must send some information to server.
One solution is sending the user AD username. Because of security reasons, this solution isn't acceptable.
Another solution is sending user AD token (which is given to the AD user on logging in to windows). In this solution the server can check validity of this token and so it can recognize the client AD user and authenticate it. Now the problem is that in implemention of client's application, I don't know how to get the AD token.
I am using C# to implement the client application. Can you please help me with that? Or do you have better solution for this kind of authentication?