1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Add PostgreSQL authentication backend (#9756)

* Add PostgreSQL authentication backend
This commit is contained in:
Loïc Blot
2020-04-27 06:54:48 +02:00
committed by GitHub
parent 2fe4641c1e
commit e564bf8ead
3 changed files with 207 additions and 0 deletions

View File

@@ -2187,6 +2187,14 @@ AuthDatabase *ServerEnvironment::openAuthDatabase(
if (name == "sqlite3")
return new AuthDatabaseSQLite3(savedir);
#if USE_POSTGRESQL
if (name == "postgresql") {
std::string connect_string;
conf.getNoEx("pgsql_auth_connection", connect_string);
return new AuthDatabasePostgreSQL(connect_string);
}
#endif
if (name == "files")
return new AuthDatabaseFiles(savedir);