【发布时间】:2011-07-09 12:34:51
【问题描述】:
我正在使用 Rails 3 和 Devise 进行身份验证。我为网站和 API(json 处理程序)的基本身份验证提供了适当的工作设计。如何启用摘要式身份验证?
他们的 Wiki 告诉我添加
def http_authenticate
authenticate_or_request_with_http_digest do |user_name, password|
user_name == "foo" && password == "bar"
end
warden.custom_failure! if performed?
end
我在哪里添加它以及如何使用户名/密码匹配?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 authentication devise