ISAPI Tools and CustomAuth.h

I’m so bad at this blogging thing. It’s just documentation and I’m the type that enjoys coding. So I keep getting distracted by actually working on current projects. However, slowly and surely, I will get these posts made.

The ISAPI Tools part of the CustomAuth project are the original classes created by Microsoft. I never modified those classes, but took advantage of them throughout the project. So, with the original and modified versions, you can use the ISAPI Tools classes as they are.

Very few changes have taken place within the CustomAuth.h file. I moved the includes and prototypes from the CustomAuth.cpp file and put them in the header. I did this simply because it was the way I was taught to organize my code and I feel more comfortable with it. It is more aesthetically pleasing to me and helps me read through the code.

A few defines have changed. The “#define MODULE_NAME” was split into two seperate defines, INI_NAME and DLL_NAME. This was done so that you could change the names of the DLL and INI as needed, so the .ini file name was not tied to the .dll file name.

The LOGON and LOGOFF defaults were set to 0, since I think you should use a custom login and logoff page for encryption.

DEFAULT_USE_CLIENT_IP and DEFAULT_LOGON_TIMEOUT were removed since the IP was no longer being used for encryption and the timeout can be set on the cookie, rather than within the filter.

DEFAULT_USE_SUCCESS_URL was added if you want to disable the use of redirection. Currently this define is not being used anywhere, but the option is there with some changing of code.

Then the DELETE_COOKIE content has changed alittle. The addition of a domain to the cookie allows it to be accessed from any subdomain under that domain, rather than being limited to a single specific site. This is a limitation for the filter that it is set to a single domain and cannot work cross-domain.

Finally, a few more global variables have been added to the list and a comment was added above the built in logoff page define. By inserting that code into the logoff page, within the CustomAuth.cpp you could print out some information on logoff. This helped me in the beginning since I didn’t (and still don’t) know how to access the information printed out with the WriteDebug function.

Leave a Reply

You must be logged in to post a comment.