www-bocal/mainsite/cas_backend.py
Théophile Bastian b1727f7e07 Clean a CAS-returned username
cas.eleves.ens.fr allows users such as '  FooBAr ' or 'foobar' in
indifferently
2017-10-14 16:57:59 +02:00

7 lines
221 B
Python

from django_cas_ng.backends import CASBackend
class BOcalCASBackend(CASBackend):
# Partly from Robin Champenois's "ExperiENS". Thanks!
def clean_username(self, username):
return username.lower().strip()