File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import django .dispatch
1616
1717pre_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,
157157 'its metadata is expired.' ))
158158 if selected_idp is None :
159159 selected_idp = list (idps .keys ())[0 ]
160-
160+
161161 # choose a binding to try first
162162 sign_requests = getattr (conf , '_sp_authn_requests_signed' , False )
163163 binding = BINDING_HTTP_POST if sign_requests else BINDING_HTTP_REDIRECT
@@ -348,7 +348,12 @@ def post(self,
348348 logger .debug ("User %s authenticated via SSO." , user )
349349 logger .debug ('Sending the post_authenticated signal' )
350350
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 )
352357 self .customize_session (user , session_info )
353358
354359 relay_state = self .build_relay_state ()
You can’t perform that action at this time.
0 commit comments