Reputation: 1100
I want to require that authenticated users provide a password to access a certain page/action.
I know that RoR has authenticate_or_request_with_http_basic() that can be used to protect an action but that requires that a name and password be entered and I'm only interested in requiring a password.
Upvotes: 0
Views: 519
Reputation: 3298
Well, you can always leave user blank.
If it isn't an option I have some bad news - browser will always ask for user and password when using http basic authentication.
However there are some different options:
session[:auth] = true
. And appropriate before_filter
in your ApplicationController
.I think second option would be best here (if of course, leaving http basic auth login/password box isn't an option).
Upvotes: 2