#ifndef AUTHMETHODS_H #define AUTHMETHODS_H #include class Auth { public: Auth() {}; virtual void setOptions(ConfigSection* options) {}; virtual bool isChroot() { return false; }; virtual bool check(std::string username, std::string password) { return false; }; virtual std::string getUserDirectory(std::string username) { return ""; }; }; #include "auth/noauth.h" #include "auth/passdb.h" Auth* getAuthByName(std::string name) { if (name == "noauth") return new NoAuth(); if (name == "passdb") return new PassdbAuth(); return new Auth(); } #endif