Added LDAP authentication support. Fixes #2186

This commit is contained in:
Khushboo Vashi
2020-04-06 15:57:05 +05:30
committed by Akshay Joshi
parent 8ceeb39268
commit f77aa3284f
26 changed files with 1243 additions and 165 deletions

View File

@@ -160,6 +160,18 @@ if 'PGADMIN_INT_KEY' in globals():
else:
app.PGADMIN_INT_KEY = ''
# Authentication sources
app.PGADMIN_DEFAULT_AUTH_SOURCE = 'internal'
app.PGADMIN_SUPPORTED_AUTH_SOURCE = ['internal', 'ldap']
if len(config.AUTHENTICATION_SOURCES) > 0:
app.PGADMIN_EXTERNAL_AUTH_SOURCE = config.AUTHENTICATION_SOURCES[0]
else:
app.PGADMIN_EXTERNAL_AUTH_SOURCE = app.PGADMIN_DEFAULT_AUTH_SOURCE
app.logger.debug(
"Authentication Source: %s" % app.PGADMIN_DEFAULT_AUTH_SOURCE)
# Output a startup message if we're not under the runtime and startup.
# If we're under WSGI, we don't need to worry about this
if __name__ == '__main__':