dlindahl / omniauth-cas

A CAS OmniAuth Strategy
MIT License
88 stars 79 forks source link

More options for values handed back by CAS #15

Closed samrocketman closed 10 years ago

samrocketman commented 11 years ago

lib/omniauth/strategies/cas.rb#L34

In our CAS setup at a University we hand back different values for :name, :email, :first_name, :last_name, and :uid_key. Since we pull those values from LDAP what our CAS setup hands back are the following.

:name => raw_info['cn'],
:email => raw_info['mail'],
:first_name => raw_info['givenName'],
:last_name => raw_info['sn'],

There should be options to configure all of those because in CAS you have the option to change how it is presented.

The problem is we can't change the mapping for only this plugin. CAS will only do mapping globally. It will also only do the mapping once (i.e. we couldn't map name to both cn and name in CAS). So the issue lies that we have hundreds of applications across our University which use the current mapping and changing our mapping just isn't feasible.

I'm not sure all of the places this option needs to take place as I haven't successfully gotten it working yet with gitlab. Though, that's also due to other issues which I've opened with gitlab.

dlindahl commented 10 years ago

Closing since #20 was merged in