From 914e405762e3231b003ffdb54f94f400b04a267b Mon Sep 17 00:00:00 2001 From: Robin Champenois Date: Wed, 18 Apr 2018 22:31:24 +0200 Subject: [PATCH] Ajout de la normalisation des clippers --- allauth_ens/providers/clipper/provider.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/allauth_ens/providers/clipper/provider.py b/allauth_ens/providers/clipper/provider.py index d14bee2..967bce3 100644 --- a/allauth_ens/providers/clipper/provider.py +++ b/allauth_ens/providers/clipper/provider.py @@ -21,6 +21,12 @@ class ClipperProvider(CASProvider): uid, extra = data return '{}@clipper.ens.fr'.format(uid.strip().lower()) + def extract_uid(self, data): + # Normalize UID + uid, _ = data + uid = uid.lower().strip() + return uid + def extract_common_fields(self, data): def get_names(clipper): assert clipper.isalnum()