ruby on rails - Resetting basic-authenticate-with -


i trying basic authentication. i've tried 1 ryan bates used in screencast bcrypt-ruby , user authentication.

for small project want use else:

http_basic_authenticate_with :name => 'user', :password => 'secret' 

i've got global called $admin , i've got method set value false (similar logout).

is there way reset authentication user (admin) has fill in "login credentials" again?

kind regards

unfortunately in case of basic_auth user stays logged in until browser window closed. if user logs in basic_auth, browser stores authentication information, , sends authentication parameters through http headers every request.

there small catch though: after logging in basic_auth, when user goes browsing though app , goes 1 link (e.g. http://appdomain.com/link1 http://appdomain.com/link2 going http://username:password@appdomain.com/link1 http://username:password@appdomain.com/link2. browser hides username:password@ part in addressbar, not know it. dirty way logout user has authenticated through basic_auth create link or redirect http://invaliduser@appdomain.com/ browser not hold authentication credentials to... edit: or alternative redirect , login user no-privilege account cannot view or within app through http://guest:password@appdomain.com

hope helped.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -