Skip to content

Commit b09ac1c

Browse files
Perdumhagander
authored andcommitted
Fix default authentication configuration
Add the required authentication backend configuration and include an example for how to set up the pgauth plugin.
1 parent 584c5c8 commit b09ac1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

django/archives/settings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
SEARCH_CLIENTS = ('127.0.0.1',)
144144
API_CLIENTS = ('127.0.0.1',)
145145
PUBLIC_ARCHIVES = False
146+
# pgauth configuration if using private archives
147+
PGAUTH_REDIRECT = "http://localhost:8000/account/auth/12/"
148+
PGAUTH_KEY = "encryption_key"
146149
ALLOW_RESEND = False
147150

148151
PGWEB_ADDRESS = 'https://www.postgresql.org'
@@ -165,6 +168,10 @@
165168
'django.contrib.sessions',
166169
] + INSTALLED_APPS
167170

171+
AUTHENTICATION_BACKENDS = (
172+
'archives.auth.AuthBackend',
173+
)
174+
168175
if not PUBLIC_ARCHIVES:
169176
from archives.util import validate_new_user
170177
PGAUTH_CREATEUSER_CALLBACK = validate_new_user

0 commit comments

Comments
 (0)