ruby-saml-rails3-example icon indicating copy to clipboard operation
ruby-saml-rails3-example copied to clipboard

Create rails-saml generator or engine

Open drnic opened this issue 12 years ago • 1 comments

The take away from this example app is all the extra code that is required on top of the ruby-saml project (plus the important SLO code paths).

Is enough of the rails code here the same for all apps (and we make a rails engine) or is it truly a starting point (and we make a rails generator)?

drnic avatar Jul 03 '12 15:07 drnic

Boy... engine vs generator is a very good question. On my own systems, I moved all of the Accounts stuff into an engine gem, and then use that in a few authentication Rails apps we have. That could probably use some more polishing, but it's functional at least. Plus, it's used only for changing SAML settings, and should be well hidden from the end users.

The SLO controller code might also deserve an engine, since it's a pretty standard part of the SAML flow. The only reason it might need tweaking is if there's an IdP out there that behaves wacky.

The index / consume methods might need to change for a given environment though. I could see people needing to set cookies, or do other redirect actions. But there are probably better Rails methods for providing this functionality to the developer if they were included in an engine. Thoughts on that?

Thanks for taking a look at my project!

--Cal

calh avatar Jul 05 '12 14:07 calh