#ifndef CONFIGFILE #define CONFIGFILE #include <iostream> #include <fstream> #include <sstream> #include <string> #include <map> using namespace std; template <class T> inline std::string to_string (const T& t) { std::stringstream ss; ss << t; return ss.str(); } class ConfigFile { private: map<string, string> Settings; bool FileExists(); void ReadSettings(); void WriteDefault(); protected: string File; void setup(); virtual string GetDefault() { return string("# No default set!"); } virtual string GetFilename() { return string("Config.conf"); } public: ConfigFile(string Filename="") { File = Filename; } string GetValue(string Key); void AddValue(string Key, string Value); }; #endif
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 7332 | Nick Poole |
Preliminary version of AuthCheck A multi-stage authentication application for use as an authentication trigger. Currently only tested against an LDAP server without TLS and against a flat file with plain-text passwords. (Under Windows XP). ToDo: Test against TLS enabled LDAP. Test against AD's LDAP interface. Test build on *nix. Add MD5 hashed flat file mode. Add DB modes (SQLite, MySQL, etc). |