gestiojeux/gestiojeux_auth/cas_backend.py
Guillaume Bertholon be99a76829 Simplify header and adapt auth pages style
Having a title in the header is worse than a normal title inside the
page. Restore the border to compensate.
2020-11-22 13:34:01 +01:00

14 lines
407 B
Python

from django_cas_ng.backends import CASBackend
from .models import CasUser
class GestioJeuxCASBackend(CASBackend):
# Copied from the BOcal project
# Partly from Robin Champenois's "ExperiENS". Thanks!
def clean_username(self, username):
return username.lower().strip()
def configure_user(self, user):
casUser = CasUser(user=user)
casUser.save()
return user