Skip to content

Instantly share code, notes, and snippets.

@ouranos
Created May 25, 2015 09:20
Show Gist options
  • Save ouranos/cea7bd3fbe97aa0e6977 to your computer and use it in GitHub Desktop.
Save ouranos/cea7bd3fbe97aa0e6977 to your computer and use it in GitHub Desktop.
# config/application.rb
# Add Warden in the middleware stack
config.middleware.insert_after ActionDispatch::Flash, Warden::Manager do |manager|
manager.default_strategies :authentication_token
end
#config/initializers/warden.rb
require Rails.root.join('lib/strategies/authentication_token_strategy')
Warden::Strategies.add(:authentication_token, AuthenticationTokenStrategy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment