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