rename
This commit is contained in:
1 parent
184288ce24
commit
cf6a611fae
16 files changed
+347
-119
No files matched your search
+27
@@ -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
|
||||
Reference in new issue
Block a user