kstateome / django-cas

K-State's maintained version of django-cas
MIT License
112 stars 83 forks source link

Multiple CAS endpoints in a single project. #51

Closed chadgh closed 8 years ago

chadgh commented 9 years ago

This doesn't seem to support having multiple CAS endpoints for a single project.

For example, if I have a Django project that has to support multiple institutions, all of which have a different CAS endpoint, there isn't a way to setup so that:

institution1views = cas.views.Institution(server_url='https://cas.institution1.edu/cas/')
institution2views = cas.views.Institution(server_url='https://cas.institution2.edu/cas/')
urlpatterns = [
    url(r'^institution1/login/$', institution1views.login, name='inst1-login'),
    url(r'^institution1/logout/$', institution1views.logout, name='inst1-logout'),
    url(r'^institution2/login/$', institution2views.login, name='inst2-login'),
    url(r'^institution2/logout/$', institution2views.logout, name='inst2-logout'),
]

This is just an example of how it might be setup. But essentially, I'm finding that it would be helpful to configure a "different" backend for different institutions within the same Django project.

dstegelman commented 9 years ago

I'm not sure this is something that we necessarily want to do. There are a lot of other variable changes that would occur by chaining the server URL as well ( how it interacts with proxy validation). If you have a good working example on how this could be done, feel free to submit a PR, but at the moment I'm very hesitant to add this type of funtionality.

dstegelman commented 8 years ago

This isn't something that we are going to pursue at this time.