mconf-web
mconf-web copied to clipboard
Store in the session a single flag with the method used for authentication
Author Name: Leonardo Daronco (Leonardo Daronco) Original Redmine Issue: 1950, http://dev.mconf.org/redmine/issues/1950
Currently there are two flags stored in the session to indicate the method used for authentication: "shib_login":https://github.com/mconf/mconf-web/blob/master/lib/mconf/shibboleth.rb#L12 and "ldap_data":https://github.com/mconf/mconf-web/blob/master/lib/mconf/ldap.rb#L11. If they are set, we know if the user signed in via Shibboleth or LDAP. There's no flag for the local authentication yet.
Instead of using multiple flags, there should be a single one, with a string value indicating the method used for authentication. For example: @session[:sign_in_method] = "ldap"@
Note: The key @ldap_data@ that LDAP stores in the session is not a simple flag, but it could be. The data stored there is not necessary since it's also stored in the database.