api keys: require reauthentication when working with API keys.
Require the user to re-enter their password before they can view, create, update, or delete their API keys. This works by tracking the timestamp of the user's last password re-entry in a `last_authenticated_at` session cookie, and redirecting the user to a password confirmation page if they haven't re-entered their password in the last hour. This is modeled after Github's Sudo mode.
This commit is contained in:
@@ -225,6 +225,7 @@ Rails.application.routes.draw do
|
||||
resources :robots, only: [:index]
|
||||
resources :saved_searches, :except => [:show]
|
||||
resource :session, only: [:new, :create, :destroy] do
|
||||
get :confirm_password, on: :collection
|
||||
get :sign_out, on: :collection
|
||||
end
|
||||
resource :source, :only => [:show]
|
||||
|
||||
Reference in New Issue
Block a user