This commit is contained in:
Wirlaburla committed 2024-10-17 16:49:05 -05:00
1 parent 184288ce24
commit cf6a611fae
16 files changed
+347 -119

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#ifndef AUTHMETHODS_H
#define AUTHMETHODS_H
#include <string>
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