title: Rails 3 Password Protect Single View
body: <p>I have gone through and looked at a bunch of screen casts (http://railscasts.com/episodes/270-authentication-in-rails-3-1) and tutorials (http://ruby.railstutorial.org/chapters/modeling-and-viewing-users-two?version=2.3#sec:secure_passwords) but I can't seem to find or apply what I am learning to create a single view password protected.</p>
  
  <p>As of now I am generating a random password and showing it to the user to go back and view a file they have uploaded (generated using SecureRandom.hex). However, I know that using http_basic doesn't seem to work when I restrict it only to the show view and method in my controller : <code>http_basic_authenticate_with :password =&gt; :passcode, :only =&gt; :show</code></p>
  
  <p>I know that line of code does not work because :passcode does not reference the individual files password that was created.</p>
  
  <p>Also, I know that http_basic_authenticate_with is not the way it should be done for secure passwords, so how would you go about this using has_secure_password etc?</p>