Update to latest version of auth plugin
authorMagnus Hagander <magnus@hagander.net>
Tue, 1 Apr 2025 10:55:27 +0000 (12:55 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 1 Apr 2025 11:01:31 +0000 (13:01 +0200)
For some reason, downstream repos had a newer version but we forgot it
in the upstream repo.

tools/communityauth/sample/django/auth.py

index b6f6067473a8374829412b110c6744aa464045a3..9343fc0fa99e8472aef966f63c5404b71cf27fc8 100644 (file)
@@ -47,12 +47,12 @@ import time
 
 
 # This signal fires when a user is created based on data from upstream.
-auth_user_created_from_upstream = Signal(providing_args=['user', ])
+auth_user_created_from_upstream = Signal()
 
 # This signal fires whenever new user data has been received. Note that this
 # happens *after* first_name, last_name and email has been updated on the user
 # record, so those are not included in the userdata struct.
-auth_user_data_received = Signal(providing_args=['user', 'userdata'])
+auth_user_data_received = Signal()
 
 
 class AuthBackend(ModelBackend):
@@ -374,13 +374,3 @@ def user_import(uid):
     auth_user_created_from_upstream.send(sender=user_import, user=u)
 
     return u
-
-
-# Try to load the key (and throw it away) to verify that the format is
-# correct.
-try:
-    k = base64.b64decode(settings.PGAUTH_KEY)
-    if len(k) != 32:
-        raise Exception("PGAUTH_KEY must be 32 bytes long")
-except Exception as e:
-    raise Exception("Invalid PGAUTH_KEY: {}".format(e))