我正在使用Authlogic,希望在控制器中实现基本的HTTP身份验证,以便我可以定义哪些操作需要进行身份验证。
我知道如何使用authenticate_or_request_with_http_basic和before_filter进行基本的HTTP身份验证,但我想听听其他人如何使用Authlogic插件来实现它。
class ItemsController < ApplicationController
before_filter :authenticate , :only => [:index, :create]
...
end