reInteractive/cassy — pull request #32 by nbudin (2014-07-06 16:12:23+00:00)
Title: Authenticator should receive the request as its :request

When trying to write a custom authenticator that needed access to the Rack request object, I discovered that the `credentials` hash didn't actually include the request, despite having a `:request` key. This seems to be because the `@env` instance variable doesn't actually 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]`.