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:
parent
2fe4641c1e
commit
e564bf8ead
3 changed files with 207 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue