rbCAS / CASino

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

Add context parameter for authenticators #126

Open meanphil opened 9 years ago

meanphil commented 9 years ago

Hi there,

When logging in my users I also need a parameter for which country they want to log into. Instead of just adding a third parameter called country and keep it as a local branch I thought I'd make it more generic in the hope you'd merge this into CASino?

Anyway, I've added a third parameter to authenticators' #validate method called context, which could just be a Hash or really any data that's specific to the particular authenticator class you're using.

joelvh commented 8 years ago

@meanphil This is exactly what I just worked on and came up with the same solution. However, I think there needs to be a way to build a context object server-side. I'm still devising a way to do that -- likely a CASino config option to specify a Proc to build a context.

joelvh commented 8 years ago

@meanphil I've sent a PR (https://github.com/meanphil/CASino/pull/1) to your fork so you can review/merge and update this PR

joelvh commented 8 years ago

@pencil can this be merged in?

joelvh commented 7 years ago

@pencil can this be merged? Are you still maintaining this project or accepting contributions?