AuthFilt - A Filter for Advanced Authentication
AuthFilt demonstrates how to write an authentication filter based on an external datasource. Authentication is the process of accepting or denying a request from a client, so AuthFilt will be notified each time an authentication request comes in. This sample uses a file (c:\inetsrv\userdb.txt) to keep track of authorized users, but you might modify this sample to access a database which holds user info.
For each authentication request, AuthFilt first looks in a cache of recently authenticated users, and when that fails, AuthFilt looks in the userdb.txt file. This shows an efficient way to authorize connections: a cache allows the filter to quickly authenticate users, and because each request comes in through the filter, speed is critical.
Steps to build the sample:
The makefile that comes with the Internet SDK uses the DLL version of the C Runtime Library. You must have this DLL on your server in order for the samples to work. For example, if you are using Visual C++ 4.0 to build the DLL, it will need the debug version of the C Runtime Library DLL, named MSVCR40D.DLL. Verify that this file is in your server's SYSTEM32 directory.