This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
Allow CAS and database authentication to live side-by-side #1106
Closed
Description
I was re-reading the README and felt like the whole "if you try to switch it will break things" aspect of our current authentication setup was a little off-putting. I think we can allow users to store both optional CAS logins as well as optional passwords and only utilize them when necessary. Here's what I have in mind:
- Add a field to the
Users
table forcas_login
- this can be blank or null - Add a method that copies one parameter into the
username
field; this will either beemail
orcas_login
. We can therefore have the app copy the appropriate username into the relevant field depending on the presence of theCAS_AUTH
variable. I'm not sure when this happens, maybe when you start the Rails server? It would also have to double check and make sure that all users have a CAS username before trying to switch; if you try to use CAS w/o having a login for every user, the app returns an error message. - In terms of switching to password authentication, we already allow for password resets using e-mail so that would be the simplest way to go
I don't know when this should happen, but making it possible would be really nice.
Activity