Sha256: b922385afed4ead0cbc254c062d41dcef401bcb6b899993a5ccb4841bafb247e

Contents?: true

Size: 643 Bytes

Versions: 14

Compression:

Stored size: 643 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 and authentication_keys methods
    # (which for example are defined in authenticatable).
    module HttpAuthenticatable
      def self.included(base)
        base.extend ClassMethods
      end

      module ClassMethods
        # 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

14 entries across 14 versions & 5 rubygems

Version Path
devise-1.0.9 lib/devise/models/http_authenticatable.rb
dcu-devise-1.0.7 lib/devise/models/http_authenticatable.rb
devise-1.0.8 lib/devise/models/http_authenticatable.rb
ivanvc-devise-1.0.7.1 lib/devise/models/http_authenticatable.rb
mongoid-devise-1.0.1 lib/devise/models/http_authenticatable.rb
devise-1.0.7 lib/devise/models/http_authenticatable.rb
devise-1.0.6 lib/devise/models/http_authenticatable.rb
devise-1.0.5 lib/devise/models/http_authenticatable.rb
devise-1.0.4 lib/devise/models/http_authenticatable.rb
devise-1.0.3 lib/devise/models/http_authenticatable.rb
glennr-devise-1.0.1.1 lib/devise/models/http_authenticatable.rb
glennr-devise-1.0.1 lib/devise/models/http_authenticatable.rb
devise-1.0.2 lib/devise/models/http_authenticatable.rb
devise-1.0.1 lib/devise/models/http_authenticatable.rb