Sha256: de4b05986acab3babb4fa8dc8b31e80f674a2c90bffa8591576fe0bd1a7aa711

Contents?: true

Size: 676 Bytes

Versions: 13

Compression:

Stored size: 676 Bytes

Contents

require 'devise/strategies/http_authenticatable'

module Devise
  module Models
    # Adds HttpAuthenticatable behavior to your model. It expects that your
    # model class responds to authenticate method
    # (which for example is defined in authenticatable).
    module HttpAuthenticatable
      def self.included(base)
        base.extend ClassMethods
      end

      module ClassMethods
        Devise::Models.config(self, :authentication_keys)

        # Authenticate an user using http.
        def authenticate_with_http(username, password)
          authenticate(authentication_keys.first => username, :password => password)
        end
      end
    end
  end
end

Version data entries

13 entries across 8 versions & 3 rubygems

Version Path
graffititracker_devise-1.0.11 lib/devise/models/http_authenticatable.rb
devise-1.0.11 lib/devise/models/http_authenticatable.rb
devise-1.0.10 lib/devise/models/http_authenticatable.rb
devise_ennder-1.4.1.0.9 test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb
devise_ennder-1.4.1.0.9 lib/devise/models/http_authenticatable.rb
devise_ennder-1.3.1.0.9 lib/devise/models/http_authenticatable.rb
devise_ennder-1.3.1.0.9 test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb
devise_ennder-1.2.1.0.9 lib/devise/models/http_authenticatable.rb
devise_ennder-1.2.1.0.9 test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb
devise_ennder-1.1.1.0.9 test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb
devise_ennder-1.1.1.0.9 lib/devise/models/http_authenticatable.rb
devise_ennder-1.0.1.0.9 lib/devise/models/http_authenticatable.rb
devise_ennder-1.0.1.0.9 test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb