1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);