File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 15
15
import django .dispatch
16
16
17
17
pre_user_save = django .dispatch .Signal (providing_args = ['attributes' , 'user_modified' ])
18
- post_authenticated = django .dispatch .Signal (providing_args = ['session_info' ])
18
+ post_authenticated = django .dispatch .Signal (providing_args = ['session_info' , 'request' ])
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def login(request,
157
157
'its metadata is expired.' ))
158
158
if selected_idp is None :
159
159
selected_idp = list (idps .keys ())[0 ]
160
-
160
+
161
161
# choose a binding to try first
162
162
sign_requests = getattr (conf , '_sp_authn_requests_signed' , False )
163
163
binding = BINDING_HTTP_POST if sign_requests else BINDING_HTTP_REDIRECT
@@ -348,7 +348,12 @@ def post(self,
348
348
logger .debug ("User %s authenticated via SSO." , user )
349
349
logger .debug ('Sending the post_authenticated signal' )
350
350
351
- post_authenticated .send_robust (sender = user , session_info = session_info )
351
+ # post_authenticated.send_robust(sender=user, session_info=session_info)
352
+ # https://github.com/knaperek/djangosaml2/issues/117
353
+ post_authenticated .send_robust (sender = user .__class__ ,
354
+ instance = user ,
355
+ session_info = session_info ,
356
+ request = request )
352
357
self .customize_session (user , session_info )
353
358
354
359
relay_state = self .build_relay_state ()
You can’t perform that action at this time.
0 commit comments