Skip to content

Conversation

@nbudin
Copy link

@nbudin nbudin commented Jul 6, 2014

When trying to write a custom authenticator that needed access to the Rack request object, I discovered that the credentials hash didn't include the request, despite having a :request key. This seems to be because the @env instance variable doesn't exist in the controller (I believe it may have once existed in past versions of Rails).

Since none of the authenticators that ship with Cassy actually reference the :request key, I think it should be safe to simply make it pass the Rack request object (which will still grant access to the Rack environment by calling credentials[:request].env). However, this change may break some people's custom authenticators if they are running a sufficiently old version of Rails that @env does exist; if they are, they would need to use credentials[:request].env rather than credentials[:request].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant