Closed opobla closed 4 years ago
Hi The auth classes are designed to be extensible and for django-cas-server to be able to use pretty much any backend. Just write your own class inheriting from AuthUser using the email address instead of username and you should be good. Django-cas-server do not depend on the Django user model.
The username transmitted to the auth class is whatever the user typed in the login form.
Thanks @nitmir
Yes, I see now. I could also extend the default DjangoAuthUser and override the __init__
method, changing just the attribute used to find the user.
Hi!
I have extended the Django User Model from AbstractUser to create a custom one to suit my needs. One of them is that there is no username. Instead, the only credentials for my users will be email and password.
I have seen that at least DjangoAuthUser and so AuthUser strongly depends on a "username". The main goal of my project is to provide a CAS implementation, so I am wondering whether should I revert to the original Django User and try to overcome the username/email problem there somehow, or try to make the adjustments in django-cas-server. Can you give me any advice about this?
Thanks a lot. Óscar