Sha256: 3d59a774e277b17765a087546fb1d1241bd63fe182409d4007a48b84c3f80451
Contents?: true
Size: 679 Bytes
Versions: 51
Compression:
Stored size: 679 Bytes
Contents
module ComfortableMexicanSofa::HttpAuth # Set username and password in config/initializers/comfortable_mexican_sofa.rb # Like this: # CmsHttpAuthentication.username = 'myname' # CmsHttpAuthentication.password = 'mypassword' mattr_accessor :username, :password # 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. def authenticate authenticate_or_request_with_http_basic do |username, password| username == self.username && password == self.password end end end
Version data entries
51 entries across 51 versions & 1 rubygems