Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # products_controller.rb
- before_filter :authenticate
- protected
- def authenticate
- authenticate_or_request_with_http_basic do |username, password|
- case request.domain
- when "domain1.com"
- username == "foo1" && password == "bar"
- when "domain2.com"
- username == "foo2" && password == "bar"
- when "domain3.com"
- username == "foo3" && password == "bar"
- end
- end
Add Comment
Please, Sign In to add comment