module ComfortableMexicanSofa::AccessControl::AdminAuthentication
Public Instance Methods
authenticate()
click to toggle source
Simple http_auth. When implementing some other form of authentication this method should return true
if everything is great, or redirect user to some other page, thus denying access to cms admin section.
# File lib/comfortable_mexican_sofa/access_control/admin_authentication.rb, line 17 def authenticate authenticate_or_request_with_http_basic do |username, password| self.username == username && self.password == password end end