Module: ComfortableMexicanSofa::AccessControl::AdminAuthentication

Defined in:
lib/comfortable_mexican_sofa/access_control/admin_authentication.rb

Instance Method Summary collapse

Instance Method Details

#authenticateObject

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.



17
18
19
20
21
# 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