diff options
author | Célestin Matte | 2022-01-15 17:48:04 +0000 |
---|---|---|
committer | Magnus Hagander | 2022-01-15 17:48:04 +0000 |
commit | b09ac1cb58b67056b2fb0caeeb6bfd37564687cd (patch) | |
tree | 2294fc970f3f8564e08a1c4b194f9632fddd65d5 /django/archives/settings.py | |
parent | 584c5c85461b3d7f9f3129755e4125cd99242353 (diff) |
Fix default authentication configuration
Add the required authentication backend configuration and include an
example for how to set up the pgauth plugin.
Diffstat (limited to 'django/archives/settings.py')
-rw-r--r-- | django/archives/settings.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/archives/settings.py b/django/archives/settings.py index 4eed26c..24861a9 100644 --- a/django/archives/settings.py +++ b/django/archives/settings.py @@ -143,6 +143,9 @@ RESEND_RATE_LIMIT_SECONDS = 30 SEARCH_CLIENTS = ('127.0.0.1',) API_CLIENTS = ('127.0.0.1',) PUBLIC_ARCHIVES = False +# pgauth configuration if using private archives +PGAUTH_REDIRECT = "http://localhost:8000/account/auth/12/" +PGAUTH_KEY = "encryption_key" ALLOW_RESEND = False PGWEB_ADDRESS = 'https://www.postgresql.org' @@ -165,6 +168,10 @@ if ALLOW_RESEND or not PUBLIC_ARCHIVES: 'django.contrib.sessions', ] + INSTALLED_APPS + AUTHENTICATION_BACKENDS = ( + 'archives.auth.AuthBackend', + ) + if not PUBLIC_ARCHIVES: from archives.util import validate_new_user PGAUTH_CREATEUSER_CALLBACK = validate_new_user |