hassox (owner)

Revisions

gist: 227537 Download_button fork
public
Public Clone URL: git://gist.github.com/227537.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
# using warden_strategies
class MyStrategy < WardenStrategies::SimpleStrategy
  config do |c|
    c[:required_params] = [:login, :password, "some:nested:param"]
    c[:user_class] = User
    c[:authenticate_method] = :authenticate_me #=> default :authenticate
    c[:error_message] = "Booo" #=> Default "Could not login"
  end
end
 
Warden::Strategies.add(:my_strategy, MyStrategy)