You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick reminder: module functions are available on the module itself and
also added as `private` methods when the module is included. It is best
that they are stateless, or rely on a more global state, due to this
dual accessibility.
This is in preparation for providing a new set of RSpec auth helpers
targeting API endpoints. Most APIs are stateless and the newer Rails 5
`ActionController::API` base class does not mix in cookie or session
support by default. Because of this the existing `sign_in` helper is not
properly suited for these controllers.
Additionally, for API endpoints the `sign_in` helper hides the fact that
authentication _must_ be provided through the `Authorization` header;
instead of assuming it was set previously in the session. This could
cause some edge cases bugs to slip through where authorization isn't
getting set, checked, or goes through the proper process.
0 commit comments