lib/merb/mixins/basic_authentication_mixin.rb in merb-0.0.7 vs lib/merb/mixins/basic_authentication_mixin.rb in merb-0.0.8

- old
+ new

@@ -16,16 +16,16 @@ username == Merb::Server.config[:basic_auth][:username] and password == Merb::Server.config[:basic_auth][:password] end def authenticate if !authenticated? - throw :halt + throw :halt, :access_denied end end def self.included(base) base.class_eval do - def filters_halted + def access_denied @status = 401 @headers['Content-type'] = 'text/plain' @headers['Status'] = 'Unauthorized' @headers['WWW-Authenticate'] = "Basic realm=\"#{Merb::Server.config[:basic_auth][:domain]}\"" return 'Unauthorized' \ No newline at end of file