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