The django-mama-cas project is an easy to run CAS implementation built on top of Django.
python3 -m venv <your virtualenv>
source /path/to/your/virtualenv/bin/activate
python -m pip install "django<3" "django-mama-cas==2.4.0"
django-admin startproject cas_test .
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
You should now have a Django project configured to serve CAS authentication with a single user created.
homeserver.yaml
to enable CAS and point it to your locally
running Django test server:
cas_config:
enabled: true
server_url: "http://localhost:8000"
service_url: "http://localhost:8081"
#displayname_attribute: name
#required_attributes:
# name: value
Note that the above configuration assumes the homeserver is running on port 8081 and that the CAS server is on port 8000, both on localhost.
Then in Element:
createsuperuser
.If you want to repeat this process you’ll need to manually logout first: