views: log SAML response and assertion in debug view (#58915)
This commit is contained in:
parent
50cb52b160
commit
be1e50e826
|
@ -324,6 +324,9 @@ class LoginView(ProfileMixin, LogMixin, View):
|
|||
'response_dump': login.response and login.response.debug(4),
|
||||
'assertion_dump': login.assertion and login.assertion.debug(4),
|
||||
}
|
||||
self.log.info('mellon: debug login attributes %s', attributes)
|
||||
self.log.info('mellon: debug login assertion_dump %s', context['assertion_dump'])
|
||||
self.log.info('mellon: debug login response_dump %s', context['response_dump'])
|
||||
return self.render(request, 'mellon/debug_login.html', context)
|
||||
|
||||
def login(self, user, attributes):
|
||||
|
|
|
@ -724,6 +724,10 @@ def test_debug_sso(db, app, idp, caplog, sp_settings, settings):
|
|||
assert '<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"' in response_text
|
||||
assert '<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"' in response_text
|
||||
assert 'mellon: created new user _' in response_text
|
||||
# check also in logs
|
||||
assert "'email': ['john.doe@gmail.com']" in caplog.text
|
||||
assert '<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"' in caplog.text
|
||||
assert '<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"' in caplog.text
|
||||
|
||||
|
||||
def test_nonce(db, app, idp, caplog, sp_settings):
|
||||
|
|
Loading…
Reference in New Issue