rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
329 stars 189 forks source link

Inflections make cas_devise_authenticatable not compatible with CASino #101

Closed tomascharad closed 9 years ago

tomascharad commented 9 years ago

Hi guys,

Some of your inflections declared as:

ActiveSupport::Inflector.inflections do |inflect| inflect.acronym 'CAS' #This one specifically inflect.acronym 'CASino' end

Are causing incompatibilities when using the devise strategy :cas_authenticatable

This causes that the methods in devise to_s.classify return CASAuthenticatable instead of CasAuthenticatable

pencil commented 9 years ago

I agree that inflections should not be used in an engine.

But why are you using CASino and Devise in the same project? Mixing CASino and Devise in the same project will lead to some other problems and is generally not recommended.

tomascharad commented 9 years ago

We wanted to have all of our user logic and administration in the same place. Given this, the administration end needed to be authenticable but this conflict made us to migrate the administration to another isolated app. Doing it was ok, but I guess that in the future there could be more people looking for the same structure as we were.

By the way, we were using cas_devise_authenticatable gem.

diegobernardes commented 9 years ago

@pencil why u don't recommend running devise with casino? what kind of problems can happen?

its awful to have the user registration in one place and the login in another

pencil commented 9 years ago

why u don't recommend running devise with casino?

Devise uses it's own logic to determine if a user is logged in or not. This can lead to inconsistent states (e.g. Devise thinks a user is signed in, CASino does not agree and vice versa)

its awful to have the user registration in one place and the login in another

Why so? The only downside with having two separate applications was, that you could not automatically login the user after the signup. But this has been addressed with the introduction of Auth Token Login.

diegobernardes commented 9 years ago

Nevermind, i'm gonna try do the things that i want in a custom authenticator to see if works.

esergion commented 9 years ago

@pencil Hi!

Devise uses it's own logic to determine if a user is logged in or not. This can lead to inconsistent states (e.g. Devise thinks a user is signed in, CASino does not agree and vice versa)

But, there is devise_cas_authenticatable gem for that, or I missing something.. I'm also want to have all user-logic and CAS in the same app. An central user account management app

pencil commented 9 years ago

devise_cas_authenticatable doesn't change the fact that Devise uses it's own user session management. In the end the decision is up to you. I just want to make sure that you guys are well aware of the possible downsides of this approach.

esergion commented 9 years ago

It's possible to combine, or even use only casino session (since we need only registration, confirmation and other account management features from Devise). That's what I did in my project. But those inflections - is pretty shitty stuff

tomascharad commented 9 years ago

Hi Sergey,

How did you combine Devise with CASino?

I had to isolate user registration into another app.

2015-06-15 15:27 GMT-03:00 Sergey Pyankov notifications@github.com:

It's possible to combine, or even use only casino session (since we need only registration, confirmation and other account management features from Devise). That's what I did in my project. But those inflections - is pretty shitty stuff

— Reply to this email directly or view it on GitHub https://github.com/rbCAS/CASino/issues/101#issuecomment-112161906.

Saludos, Tomás

mikel commented 9 years ago

Hey there, I've created a PR #124 to handle this.

pencil commented 9 years ago

Will be included in the next release.