Class: Authlogic::ControllerAdapters::AbstractAdapter

### Home Classes Methods

### In Files

- lib/authlogic/controller_adapters/abstract_adapter.rb

### Parent

Object

### Methods

- ::new
- #authenticate_with_http_basic
- #cookie_domain
- #cookies
- #last_request_update_allowed?
- #params
- #request
- #request_content_type
- #responds_to_last_request_update_allowed?
- #responds_to_single_access_allowed?
- #session
- #single_access_allowed?

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- Authlogic
- Authlogic::ActsAsAuthentic
- Authlogic::ActsAsAuthentic::Base
- Authlogic::ActsAsAuthentic::Base::Config
- Authlogic::ActsAsAuthentic::Email
- Authlogic::ActsAsAuthentic::Email::Config
- Authlogic::ActsAsAuthentic::Email::Methods
- Authlogic::ActsAsAuthentic::LoggedInStatus
- Authlogic::ActsAsAuthentic::LoggedInStatus::Config
- Authlogic::ActsAsAuthentic::LoggedInStatus::Methods
- Authlogic::ActsAsAuthentic::LoggedInStatus::Methods::InstanceMethods
- Authlogic::ActsAsAuthentic::Login
- Authlogic::ActsAsAuthentic::Login::Config
- Authlogic::ActsAsAuthentic::Login::Methods
- Authlogic::ActsAsAuthentic::MagicColumns
- Authlogic::ActsAsAuthentic::MagicColumns::Methods
- Authlogic::ActsAsAuthentic::Password
- Authlogic::ActsAsAuthentic::Password::Callbacks
- Authlogic::ActsAsAuthentic::Password::Config
- Authlogic::ActsAsAuthentic::Password::Methods
- Authlogic::ActsAsAuthentic::Password::Methods::InstanceMethods
- Authlogic::ActsAsAuthentic::PerishableToken
- Authlogic::ActsAsAuthentic::PerishableToken::Config
- Authlogic::ActsAsAuthentic::PerishableToken::Methods
- Authlogic::ActsAsAuthentic::PerishableToken::Methods::ClassMethods
- Authlogic::ActsAsAuthentic::PerishableToken::Methods::InstanceMethods
- Authlogic::ActsAsAuthentic::PersistenceToken
- Authlogic::ActsAsAuthentic::PersistenceToken::Methods
- Authlogic::ActsAsAuthentic::PersistenceToken::Methods::ClassMethods
- Authlogic::ActsAsAuthentic::PersistenceToken::Methods::InstanceMethods
- Authlogic::ActsAsAuthentic::RestfulAuthentication
- Authlogic::ActsAsAuthentic::RestfulAuthentication::Config
- Authlogic::ActsAsAuthentic::RestfulAuthentication::InstanceMethods
- Authlogic::ActsAsAuthentic::SessionMaintenance
- Authlogic::ActsAsAuthentic::SessionMaintenance::Config
- Authlogic::ActsAsAuthentic::SessionMaintenance::Methods
- Authlogic::ActsAsAuthentic::SingleAccessToken
- Authlogic::ActsAsAuthentic::SingleAccessToken::Config
- Authlogic::ActsAsAuthentic::SingleAccessToken::Methods
- Authlogic::ActsAsAuthentic::SingleAccessToken::Methods::InstanceMethods
- Authlogic::ActsAsAuthentic::ValidationsScope
- Authlogic::ActsAsAuthentic::ValidationsScope::Config
- Authlogic::AuthenticatesMany
- Authlogic::AuthenticatesMany::Association
- Authlogic::AuthenticatesMany::Base
- Authlogic::ControllerAdapters
- Authlogic::ControllerAdapters::AbstractAdapter
- Authlogic::ControllerAdapters::MerbAdapter
- Authlogic::ControllerAdapters::MerbAdapter::MerbImplementation
- Authlogic::ControllerAdapters::RailsAdapter
- Authlogic::ControllerAdapters::RailsAdapter::AuthlogicLoadedTooLateError
- Authlogic::ControllerAdapters::RailsAdapter::RailsImplementation
- Authlogic::ControllerAdapters::SinatraAdapter
- Authlogic::ControllerAdapters::SinatraAdapter::Adapter
- Authlogic::ControllerAdapters::SinatraAdapter::Adapter::Implementation
- Authlogic::ControllerAdapters::SinatraAdapter::Controller
- Authlogic::ControllerAdapters::SinatraAdapter::Cookies
- Authlogic::CryptoProviders
- Authlogic::CryptoProviders::AES256
- Authlogic::CryptoProviders::BCrypt
- Authlogic::CryptoProviders::MD5
- Authlogic::CryptoProviders::Sha1
- Authlogic::CryptoProviders::Sha256
- Authlogic::CryptoProviders::Sha512
- Authlogic::CryptoProviders::Wordpress
- Authlogic::I18n
- Authlogic::I18n::Translator
- Authlogic::Random
- Authlogic::Regex
- Authlogic::Session
- Authlogic::Session::Activation
- Authlogic::Session::Activation::ClassMethods
- Authlogic::Session::Activation::InstanceMethods
- Authlogic::Session::ActiveRecordTrickery
- Authlogic::Session::ActiveRecordTrickery::ClassMethods
- Authlogic::Session::ActiveRecordTrickery::InstanceMethods
- Authlogic::Session::Base
- Authlogic::Session::BruteForceProtection
- Authlogic::Session::BruteForceProtection::Config
- Authlogic::Session::BruteForceProtection::InstanceMethods
- Authlogic::Session::Callbacks
- Authlogic::Session::Cookies
- Authlogic::Session::Cookies::Config
- Authlogic::Session::Cookies::InstanceMethods
- Authlogic::Session::Existence
- Authlogic::Session::Existence::ClassMethods
- Authlogic::Session::Existence::InstanceMethods
- Authlogic::Session::Foundation
- Authlogic::Session::Foundation::ClassMethods
- Authlogic::Session::Foundation::InstanceMethods
- Authlogic::Session::HttpAuth
- Authlogic::Session::HttpAuth::Config
- Authlogic::Session::HttpAuth::InstanceMethods
- Authlogic::Session::Id
- Authlogic::Session::Klass
- Authlogic::Session::Klass::Config
- Authlogic::Session::Klass::InstanceMethods
- Authlogic::Session::MagicColumns
- Authlogic::Session::MagicColumns::Config
- Authlogic::Session::MagicColumns::InstanceMethods
- Authlogic::Session::MagicStates
- Authlogic::Session::MagicStates::Config
- Authlogic::Session::MagicStates::InstanceMethods
- Authlogic::Session::Params
- Authlogic::Session::Params::Config
- Authlogic::Session::Params::InstanceMethods
- Authlogic::Session::Password
- Authlogic::Session::Password::Config
- Authlogic::Session::Password::InstanceMethods
- Authlogic::Session::PerishableToken
- Authlogic::Session::Persistence
- Authlogic::Session::Persistence::ClassMethods
- Authlogic::Session::Persistence::InstanceMethods
- Authlogic::Session::PriorityRecord
- Authlogic::Session::Scopes
- Authlogic::Session::Scopes::ClassMethods
- Authlogic::Session::Scopes::InstanceMethods
- Authlogic::Session::Session
- Authlogic::Session::Session::Config
- Authlogic::Session::Session::InstanceMethods
- Authlogic::Session::Timeout
- Authlogic::Session::Timeout::Config
- Authlogic::Session::Timeout::InstanceMethods
- Authlogic::Session::UnauthorizedRecord
- Authlogic::Session::Validation
- Authlogic::Session::Validation::Errors
- Authlogic::TestCase
- Authlogic::TestCase::MockController
- Authlogic::TestCase::MockLogger
- Authlogic::TestCase::RailsRequestAdapter
- Object

No matching classes.

# Authlogic::ControllerAdapters::AbstractAdapter

Allows you to use Authlogic in any framework you want, not just rails. See the RailsAdapter or MerbAdapter for an example of how to adapt Authlogic to work with your framework.

### Attributes

controller[RW]

### Public Class Methods

new(controller) click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 8
    def initialize(controller)
      self.controller = controller
    end

### Public Instance Methods

authenticate_with_http_basic(&block) click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 12
    def authenticate_with_http_basic(&block)
      @auth = Rack::Auth::Basic::Request.new(controller.request.env)
      if @auth.provided? and @auth.basic?
        block.call(*@auth.credentials)
      else
        false
      end
    end

cookie_domain() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 25
    def cookie_domain
      raise NotImplementedError.new("The cookie_domain method has not been implemented by the controller adapter")
    end

cookies() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 21
    def cookies
      controller.cookies
    end

last_request_update_allowed?() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 57
    def last_request_update_allowed?
      controller.send(:last_request_update_allowed?)
    end

params() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 29
    def params
      controller.params
    end

request() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 33
    def request
      controller.request
    end

request_content_type() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 37
    def request_content_type
      request.content_type
    end

responds_to_last_request_update_allowed?() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 53
    def responds_to_last_request_update_allowed?
      controller.respond_to?(:last_request_update_allowed?, true)
    end

responds_to_single_access_allowed?() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 45
    def responds_to_single_access_allowed?
      controller.respond_to?(:single_access_allowed?, true)
    end

session() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 41
    def session
      controller.session
    end

single_access_allowed?() click to toggle source

    # File lib/authlogic/controller_adapters/abstract_adapter.rb, line 49
    def single_access_allowed?
      controller.send(:single_access_allowed?)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.