lib/authlogic/controller_adapters/merb_adapter.rb in authlogic-1.0.0 vs lib/authlogic/controller_adapters/merb_adapter.rb in authlogic-1.1.0

- old
+ new

@@ -2,36 +2,9 @@ module ControllerAdapters # = Merb Adapter # Adapts authlogic to work with merb. The point is to close the gap between what authlogic expects and what the merb controller object # provides. Similar to how ActiveRecord has an adapter for MySQL, PostgreSQL, SQLite, etc. class MerbAdapter < AbstractAdapter - attr_accessor :controller - - def initialize(controller) - self.controller = controller - end - - def authenticate_with_http_basic(&block) - @auth = Rack::Auth::Basic::Request.new(controller.request.env) - if @auth.provided? and @auth.basic? - black.call(*@auth.credentials) - else - false - end - end - - def cookies - controller.cookies - end - - def request - controller.request - end - - def session - controller.session - end - # = Merb Implementation # Lets Authlogic know about the controller object, AKA "activates" authlogic. module MerbImplementation def self.included(klass) # :nodoc: klass.before :activate_authlogic \ No newline at end of file