find the http-auth username in rails
1 2 auth.backend = your_preferred_method 3 auth.backend.your_method.userfile = "yourfile.password" 4 auth.require = ("/" => ("method" => "digest", "realm" => "your site", "require"=>"valid-user" ) ) 5
in rails
1 2 @request.env["HTTP_AUTHORIZATION"].scan(/Digest username=\W+["]?([a-z0-9]+)/i).to_s