I require an authentication module written in PHP at the server and a C# module at the client. All communications between client and server will be encrypted using a symmetric key obtained through the Diffie-Hellman key exchange protocol.
After establishing secure communications, a username, password and application name is sent to the server, which will authenticate the user for that application based on data in a flat file on the server. The server will then return, based on which application is requested, either the contents of a file on the server (configurable per application) or a text string (configurable per user/application combo).
There must be no databases involved in this project, all data must be stored in flat files on the server side.
The C# module must be delivered as a self-contained library and handle all communications and encryption protocols internally. The C# module will be provided with the website url, username, password and application. It should be able to indicate whether the contents of a file or a text string were returned by the server side, and be able to present the return value as either a string or a byte-array.