apps: ajoute la méthode d'authentification aux statistiques sur les SSO réussis

This commit is contained in:
Benjamin Dauvergne 2017-11-24 19:05:55 +01:00
parent 57430e0f17
commit 4d2abbdae7
1 changed files with 3 additions and 1 deletions

View File

@ -546,7 +546,9 @@ class AppConfig(django.apps.AppConfig):
def cut_event_sso_success(self, idp, service, user, **kwargs):
msg = u'connexion à %s' % service.name
self.log_action(user, msg)
self.stat('sso-success', service.slug)
how = self.get_authentication_how()
method = self.get_authentication_method(how)
self.stat('sso-success', service.slug, method or 'inconnu')
def cut_event_cut_edit_core(self, user, form, **kwargs):
if not form.has_changed():