dlindahl / omniauth-cas

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

Pluggable ServiceTicketValidator #31

Closed alksl closed 9 years ago

alksl commented 10 years ago

Hi

Is it possible to make the ServiceTicketValidator overridable ?. I have a use case where I need to fetch additional user data from other sources.

Either by supplying a block or an alternative object. For example by removing this hardcoded classname. https://github.com/dlindahl/omniauth-cas/blob/master/lib/omniauth/strategies/cas.rb#L74

dlindahl commented 10 years ago

@alksl Do you still need this feature?

alksl commented 10 years ago

Yes, I made some experiments here https://github.com/alksl/omniauth-cas/commit/d62e107d0c352d026c33e49ae3abc32ab6170b53

It is now used in production where the block fetches some data from LDAP and does a merge in omniauth. Not sure how to test it though.

Is this something that could be accepted ? or is it to much of an edge case ?

dlindahl commented 9 years ago

See the README for details. Let me know what you think or if its not clear!

alksl commented 9 years ago

Looks good, :heart: