#82 HTTP Basic Authentication
Rails 2.0 offers an extremely easy way to do HTTP basic authentication. See how in this episode.
Resources
products_controller.rb
before_filter :authenticate protected def authenticate authenticate_or_request_with_http_basic do |username, password| username == "foo" && password == "bar" end end
loading